Hallo zusammen,
ich habe gelesen, dass man in der GlassFish Konfigurationsdatei ..glassfish/domains/domain1/config/domain.xml folgenden Eintrag ändern muss, damit der voreingestellte Port 8080 durch 80 ersetzt wird und der Server im Internet ohne Angabe des Ports erreichbar ist.
<network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool" />
auf
<network-listener port="80" ...
Fahre ich den GlassFish wieder hoch, lese ich nach wie vor, dass er auf 8080 hört. Er ist aus dem Internet mit der Adresse http:// [beliebig]:8080/Seite auch erreichbar, aber nicht mit http:// [beliebig]/Seite . Mit Portscanner stelle ich fest, dass Port 8080 offen und 80 geschlossen ist, obwohl ich den im Router frei gegeben habe.
Eine Firewall habe ich nach Anleitung so konfiguriert:
#!/bin/bash # echo "Initializing Firewall ..."; modprobe ip_conntrack # Clear all other rules iptables -F iptables -X iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -P FORWARD DROP # # Loopback communication iptables -A INPUT -i lo -j ACCEPT iptables -A OUTPUT -o lo -j ACCEPT # Statefull Inspection iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -m state --state INVALID -j DROP iptables -A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # SSH iptables -A INPUT -p tcp --dport 22 -j ACCEPT iptables -A OUTPUT -p tcp --dport 22 -j ACCEPT # ICMP Ping iptables -A INPUT -p icmp -j ACCEPT iptables -A OUTPUT -p icmp -j ACCEPT # DNS iptables -A INPUT -p udp --dport 53 -j ACCEPT iptables -A INPUT -p tcp --dport 53 -j ACCEPT iptables -A OUTPUT -p udp --dport 53 -j ACCEPT iptables -A OUTPUT -p tcp --dport 53 -j ACCEPT # WWW iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A OUTPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 8080 -j ACCEPT # ? iptables -A OUTPUT -p tcp --dport 8080 -j ACCEPT # ? iptables -A INPUT -p tcp --dport 443 -j ACCEPT iptables -A OUTPUT -p tcp --dport 443 -j ACCEPT # FTP #iptables -A INPUT -p tcp --dport 21 -j MYACCEPT #iptables -A OUTPUT -p tcp --dport 21 -j MYACCEPT # DHCP #iptables -A INPUT -p udp --dport 67 -j ACCEPT echo "Firewall is configured and active! :-)" # #OUTPUT: iptables -A OUTPUT -p ALL -j ACCEPT # Ausgehende Pakete erlauben
Was ist hier los ? Ist das korrekt ? Was kann ich prüfen ?
Moderiert von Cruiz:
Dieses Thema ist verschoben worden. Bitte beachte die als wichtig markierten Themen („Welche Themen gehören hier her und welche nicht?“)!