carter
07-06-2008, 16:28
Hallo,
ich möchte über das WAN-Interface direkt auf den THTTPD-Webserver geleitet werden. Dieser läuft bei mir auf Port 81. Das Webinterface anscheinend auf Port 80. Ich habe die unten angegebene Konfiguration in der post-firewall gesetzt. Ein Routing von Paketen auf Port 81, die für Port 80 bestimmt sind, findet aber damit nicht statt. Wie ist es nun möglich den Port des Webinterfaces (dafür läuft doch anscheinend ein separater Webserver) zu ändern, sodass THTTPD auf Port 80 läuft?
Hier die /usr/local/sbin/post-firewall
#!/bin/sh
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 81 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i $1 -p tcp --dport 80 -j DNAT --to-destination $4:81
iptables -A INPUT -j DROP
Hier die /opt/etc/thttpd.conf
dir=/opt/share/www
port=81
user=nobody
nochroot
nosymlink
novhost
logfile=/opt/var/log/thttpd.log
# Please do not edit pidfile path at it is use to kill thttpd process during init
pidfile=/opt/var/run/thttpd.pid
Danke für eure Tips!
ich möchte über das WAN-Interface direkt auf den THTTPD-Webserver geleitet werden. Dieser läuft bei mir auf Port 81. Das Webinterface anscheinend auf Port 80. Ich habe die unten angegebene Konfiguration in der post-firewall gesetzt. Ein Routing von Paketen auf Port 81, die für Port 80 bestimmt sind, findet aber damit nicht statt. Wie ist es nun möglich den Port des Webinterfaces (dafür läuft doch anscheinend ein separater Webserver) zu ändern, sodass THTTPD auf Port 80 läuft?
Hier die /usr/local/sbin/post-firewall
#!/bin/sh
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 81 -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i $1 -p tcp --dport 80 -j DNAT --to-destination $4:81
iptables -A INPUT -j DROP
Hier die /opt/etc/thttpd.conf
dir=/opt/share/www
port=81
user=nobody
nochroot
nosymlink
novhost
logfile=/opt/var/log/thttpd.log
# Please do not edit pidfile path at it is use to kill thttpd process during init
pidfile=/opt/var/run/thttpd.pid
Danke für eure Tips!