apache hört nicht auf prot 80

Message
Author
christian
Posts: 238
Joined: 13. Jul 2001 11:29
Contact:

apache hört nicht auf prot 80

#1 Post by christian »

Hallo zusammen.

Ich habe den Apache Webserver nun zum laufen gebracht.
Funktioniert einwandfrei.

Im internen LAN ist der Server ohne Probleme auf Port 80 erreichbar.
Zufgriffe vom Internet aus funktionieren nicht.
Ich habe den Test gemacht und den Server auf dem Port 1080 testweise
geschaltet. Diese Zugriffe funktionieren.

Was muss eingestellt werden, daß der Webserver auf vom Internet aus auf
Port 80 hört?

Vielen Dank für eure Hilfe.

Christian

trinity
Posts: 821
Joined: 12. Oct 2001 10:04

Re: apache hört nicht auf prot 80

#2 Post by trinity »

Nichts.
Überprüfe doch mal deinen Paketfilter.
"Korrekt, Freundlich, Kostenfrei", wähle genau zwei. (Lutz Donnerhacke in dcsf)

christian
Posts: 238
Joined: 13. Jul 2001 11:29
Contact:

Re: apache hört nicht auf prot 80

#3 Post by christian »

Packetfilter? Also was Firewallmäßiges habe ich nicht laufen...

Wo soll ich genau schauen?

Andreas B.

Re: apache hört nicht auf prot 80

#4 Post by Andreas B. »

mh.. Hast du eine Variante schnell und Sorglos von Mandrake gewaehlt ?

trinity
Posts: 821
Joined: 12. Oct 2001 10:04

Re: apache hört nicht auf prot 80

#5 Post by trinity »

schau mal mit folgendem Befehl nach:
iptables -L -n

Eine andere Möglichkeit wäre, dass du Virtuelle Server einsetzt. Dann muss eine Namensauflösung deines "Virtuellen Servers" möglich sein.
"Korrekt, Freundlich, Kostenfrei", wähle genau zwei. (Lutz Donnerhacke in dcsf)

christian
Posts: 238
Joined: 13. Jul 2001 11:29
Contact:

Re: apache hört nicht auf prot 80

#6 Post by christian »

Der Befehl iptables -L -n gibt folgendes aus.

Chain INPUT (policy ACCEPT)
targe prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Ich kenn mich mit iptables nicht aus. Was bedeutet diese Ausgabe?

trinity
Posts: 821
Joined: 12. Oct 2001 10:04

Re: apache hört nicht auf prot 80

#7 Post by trinity »

Diese Zeilen, sagen aus, dass du keine TCP/IP Pakete filterst (damit sollte dein Webserver eigentlich über das Internet erreichbar sein).

Wie hast du eigentlich deine Internet - Webserver Anbindung getestet?
Falls du daueronline bist, gib hier einfach mal deine IP an, und ich rufe dann mal eine Webseite ab.

Gruß
"Korrekt, Freundlich, Kostenfrei", wähle genau zwei. (Lutz Donnerhacke in dcsf)

michael

Re: apache hört nicht auf prot 80

#8 Post by michael »

schau mal ob du die BindAdress direktive benutzen tust.
wenn ja dann kommentiere sie mal aus.

christian
Posts: 238
Joined: 13. Jul 2001 11:29
Contact:

Re: apache hört nicht auf prot 80

#9 Post by christian »

Getestet hab ich ihn von mit einem Kollegen zusammen. Wenn apache auf Port 80 lief, bekahm er die Fehlermeldung, daß die Adresse nicht auffindbar ist.
Sobald ich ihn auf Port 1080 "geschaltet" habe, ging alles einwandfrei.
Im Moment läuft er auf Port 1080.

@michael: Was heißt BindAdresse?

Bis dann.
Christian

michael

Re: apache hört nicht auf prot 80

#10 Post by michael »

mit BindAdress (ip) kannst du apache veranlassen "NUR auf dieser ip" auf anfragen zu warten.
zb :
rechner mit 2 netKarten
eth0 192.168.0.10 (lan)
eth1 tralala (zum dsl modem)

BindAdress 192.168.0.10

die ip 192.168.0.10 ist dem dev eth0 vergeben . ergo antwortet apache nur auf anfragen die von eth0 reinkommen ( im beispiel dem lan)
mfg
michael

michael

Re: apache hört nicht auf prot 80

#11 Post by michael »

ich sehe (lese ;) ) gerade das es ja mit port 1080 auch vom inet geht.
also liegt es nicht an dem BindAdress

hast du vieleicht den inetd(oder einen anderen wrapper) installiert?
wenn ja , dann schau dir mal dessen regeln an.
bei inetd (hosts.allow & hosts.deny)

mfg
michael

christian
Posts: 238
Joined: 13. Jul 2001 11:29
Contact:

Re: apache hört nicht auf prot 80

#12 Post by christian »

Der inetd läuft.
Hier ist die inetd.conf.

# See "man 8 inetd" for more information.
#
# If you make changes to this file, either reboot your machine or send the
# inetd a HUP signal with "/etc/init.d/inetd reload" or by hand:
# Do a "ps x" as root and look up the pid of inetd. Then do a
# "kill -HUP <pid of inetd>".
# The inetd will re-read this file whenever it gets that signal.
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
# echo stream tcp nowait root internal
# echo dgram udp wait root internal
# discard stream tcp nowait root internal
# discard dgram udp wait root internal
# daytime stream tcp nowait root internal
# daytime dgram udp wait root internal
# chargen stream tcp nowait root internal
# chargen dgram udp wait root internal
time stream tcp nowait root internal
time dgram udp wait root internal
#
# These are standard services.
#
# ftp stream tcp nowait root /usr/sbin/tcpd wu.ftpd -a
# ftp stream tcp nowait root /usr/sbin/tcpd proftpd
# ftp stream tcp nowait root /usr/sbin/tcpd in.ftpd
#
# If you want telnetd not to "keep-alives" (e.g. if it runs over a ISDN
# uplink), add "-n". See 'man telnetd' for more details.
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
# nntp stream tcp nowait news /usr/sbin/tcpd /usr/sbin/leafnode
# smtp stream tcp nowait root /usr/sbin/sendmail sendmail -bs
# printer stream tcp nowait root /usr/sbin/tcpd /usr/bin/lpd -i
#
# Shell, login, exec and talk are BSD protocols.
# The option "-h" permits ``.rhosts'' files for the superuser. Please look at
# man-page of rlogind and rshd to see more configuration possibilities about
# .rhosts files.
# shell stream tcp nowait root /usr/sbin/tcpd in.rshd -L
# shell stream tcp nowait root /usr/sbin/tcpd in.rshd -aL
#
# If you want rlogind not to "keep-alives" (e.g. if it runs over a ISDN
# uplink), add "-n". See 'man rlogind' for more details.
login stream tcp nowait root /usr/sbin/tcpd in.rlogind
# login stream tcp nowait root /usr/sbin/tcpd in.rlogind -a
# exec stream tcp nowait root /usr/sbin/tcpd in.rexecd
# talk dgram udp wait root /usr/sbin/tcpd in.talkd
# ntalk dgram udp wait root /usr/sbin/tcpd in.talkd
# These entries are for the KDE version of talk. If you enable them,
# you have to disable the version above.
# talk dgram udp wait root /usr/sbin/tcpd /opt/kde2/bin/ktalkd
# ntalk dgram udp wait root /usr/sbin/tcpd /opt/kde2/bin/ktalkd
#
#
# Pop et al
#
# pop2 stream tcp nowait root /usr/sbin/tcpd in.pop2d
# pop3 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/popper -s
#
# Imapd - Interactive Mail Access Protocol server
# Attention: This service is very insecure
imap stream tcp nowait root /usr/sbin/tcpd imapd
#
# Comsat - has to do with mail.
#
# comsat dgram udp wait root /usr/sbin/tcpd in.comsat
#
# The Internet UUCP service.
#
# uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l
#
# Tftp service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
#
# tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
# bootps dgram udp wait root /usr/sbin/bootpd bootpd -c /tftpboot
#
# Finger, systat and netstat give out user information which may be
# valuable to potential "system crackers." Many sites choose to disable
# some or all of these services to improve security.
# Try "telnet localhost systat" and "telnet localhost netstat" to see that
# information yourself!
#
# finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd -w
# systat stream tcp nowait nobody /usr/sbin/tcpd /bin/ps -auwwx
# netstat stream tcp nowait root /usr/sbin/tcpd /bin/netstat -a
#
# For man on the fly and ht://dig (full text search)
#
# http-rman stream tcp nowait.10000 nobody /usr/sbin/tcpd /usr/sbin/http-rman
#
# For XCept4
#
# btx stream tcp nowait root /usr/sbin/tcpd /usr/lib/xcept4/bin/ceptd -i/usr/lib/xcept4/etc/init.ceptd -u/usr/lib/xcept4/etc/users.ceptd -l/var/log/log.ceptd
#
# For rplay daemon
#
# Old versions of rplay:
# rplay dgram udp wait root /usr/sbin/tcpd rplayd -b 8192 -c 60 -s 8192
# New Versions of rplay (>=3.3.0)
# rplay dgram udp wait root /usr/sbin/tcpd rplayd -t 30 -c 60 -s 16384 -F0 --inetd
#
# vbox (Voice Box)
# vboxd stream tcp nowait root /usr/sbin/tcpd /usr/sbin/vboxd
#
# For midinetd
# midinet stream tcp nowait root /usr/sbin/tcpd in.midinetd
#
# swat is the Samba Web Administration Tool
# swat stream tcp nowait.400 root /usr/sbin/swat swat
#
#
# amanda backup server with indexing capabilities
# amandaidx stream tcp nowait root /usr/lib/amanda/amindexd amindexd
# amidxtape stream tcp nowait root /usr/lib/amanda/amidxtaped amidxtaped
#
# amanda backup client
# amanda dgram udp wait amanda /usr/lib/amanda/amandad amandad
#
# the rsync daemon
# rsync stream tcp nowait root /usr/sbin/tcpd /usr/sbin/rsyncd --daemon
#
#
# Mimer database
# mimer stream tcp nowait root /opt/mimer/bin/mimtcp mimtcp -l
#
# CVS pserver (remote acces to your CVS repositories)
# Please read the section on security and passwords in the CVS manual,
# before you enable this.
# cvspserver stream tcp nowait root /usr/sbin/tcpd /usr/bin/cvs -f --allow-root=/home/cvsroot pserver
#
# procstatd deamon (cluster software)
# procstatd stream tcp nowait nobody /usr/sbin/tcpd /usr/sbin/procstatd -i 7885
#
# End.


=EOF=

Die hosts.allow ist komplett leer (alles auskommentiert).
In der hosts.deny ist folgende Zeile zu finden.
http-rman : ALL EXCEPT LOCAL

Scheint ja was größeres zu sein :)

michael

Re: apache hört nicht auf prot 80

#13 Post by michael »

hast du den inetd bewust! eingeschaltet ?
welche distri hast du (suse, rh ,.. )
wenn es möglich ist schalte den inetd einfach mal ab
(bei suse: /etc/init.d/inetd stop )
und probier dan mal nen zugriff vom web(auf port 80).


mfg
michael

michael

Re: apache hört nicht auf prot 80

#14 Post by michael »

oder wenn du den inetd nicht abschalten willst ;)

für JEDEN den zugriff auf port 80 erlauben
in der hosts.allow
80: ALL
einfügen
den inetd neustarten. nicht vergessen !
und apache wieder den port 80 geben ;) auch den apache neustart !!!
mfg
michael

christian
Posts: 238
Joined: 13. Jul 2001 11:29
Contact:

Re: apache hört nicht auf prot 80

#15 Post by christian »

Also!
Ich hab diesen Eintrag in der hosts.allow gemacht. Jetzt funktioniert es!
Stellt das jetzt irgendein Risiko da?

Nächste Frage. Ich hab den apache so gut wie in der Grundkonfiguration. Sollte ich aus sicherheitsrelevanten Gründen irgendwelche Einstellungen noch vornehmen?

Post Reply