- Registriert
- 5. Juli 2007
- Beiträge
- 25.461
- Lösungen
- 5
- Reaktionspunkte
- 27.535
- Punkte
- 3.870
Für die, die sich nicht auskennen, die sollten folgendes machen.
FAQ für Debian mit Apache
In /etc/apache2/sites-enabled/000-default den Port ändern. Sollte eine Domain eingesetzt werden, dann diese wählen.
	
	
	
		
In /etc/apache2/ports.conf
	
	
	
		
zu guter letzt in die Console noch Apache neu starten mit /etc/init.d/apache2 restart
Dann sollte dringend der SSH Port noch gewechselt werden
Ändert in der /etc/ssh/sshd_config den Port beliebig
	
	
	
		
Dann noch /etc/init.d/ssh restart in der Console ausführen.
Noch sicher ist es jedoch SSH für den normalen Login abzuschalten und hier ein authorized_keys zu erstellen mit dem man sich anmelden kann.
	
		
			
		
		
	
				
			FAQ für Debian mit Apache
In /etc/apache2/sites-enabled/000-default den Port ändern. Sollte eine Domain eingesetzt werden, dann diese wählen.
		Code:
	
	[COLOR=#ff0000]<VirtualHost *:2255>[/COLOR]
    ServerAdmin webmaster@localhost
    
    DocumentRoot /var/www/
    <Directory />
        Options FollowSymLinks
        AllowOverride None
    </Directory>
    <Directory /var/www/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>
    ErrorLog /var/log/apache2/error.log
    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn
    CustomLog /var/log/apache2/access.log combined
    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>
</VirtualHost>In /etc/apache2/ports.conf
		Code:
	
	# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and
# README.Debian.gz
NameVirtualHost *:[COLOR=#ff0000]2255[/COLOR]
Listen [COLOR=#ff0000]2255[/COLOR]
<IfModule mod_ssl.c>
    # SSL name based virtual hosts are not yet supported, therefore no
    # NameVirtualHost statement here
    Listen 443
</IfModule>zu guter letzt in die Console noch Apache neu starten mit /etc/init.d/apache2 restart
Dann sollte dringend der SSH Port noch gewechselt werden
Ändert in der /etc/ssh/sshd_config den Port beliebig
		Code:
	
	# Package generated configuration file
# See the sshd(8) manpage for details
# What ports, IPs and protocols we listen for
[COLOR=#ff0000]Port 1111[/COLOR]
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
# Logging
SyslogFacility AUTH
LogLevel INFO
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
StrictModes yes
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile    %h/.ssh/authorized_keys
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
#PasswordAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Subsystem sftp /usr/lib/openssh/sftp-server
UsePAM yesDann noch /etc/init.d/ssh restart in der Console ausführen.
Noch sicher ist es jedoch SSH für den normalen Login abzuschalten und hier ein authorized_keys zu erstellen mit dem man sich anmelden kann.
			
				Zuletzt bearbeitet von einem Moderator: 
			
		
	
								
								
									
	
		
			
		
		
	
	
	
		
			
		
		
	
								
							
							 
	 
 
		
 
 
		 
 
		 
 
		