PDA

Bekijk de volledige versie : HOWTO: Simple port forwarding for Web / lighttpd



clausbruun
16-02-2007, 09:47
Im running lighttpd at a custom port and i want to forward port 80 to that port so my custom webserver handles all http requests


# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
# iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to [ROUTER LOCAL IP]:[CUSTOM PORT]

clausbruun
22-02-2007, 19:31
Im running lighttpd at a custom port and i want to forward port 80 to that port so my custom webserver handles all http requests


# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
# iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to [ROUTER LOCAL IP]:[CUSTOM PORT]



Hmmm does not work right? does anybody know why ?

Gizmo1007
08-11-2007, 08:29
Hmmm does not work right? does anybody know why ?

Hi Clausbruun,

Your command looks right, for the NAT table but did you also need to include a reverse of these on you INPUT table?
Second did you delete the NAT and INPUT settings for ASUS photo share? these will clash with you getting port 80 forwarded

check out new post on 80 >> 8081