eitsch
01-12-2007, 08:53
hi
i want to run my http server in my local lan on port 8080 and would like to reach it at port 80 from wan
so i first tried to do that with iptables with the following commands:
# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
# iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to 192.168.1.1:8080
but this does not work in the way i expected it to be, because it forwards my traffic to the internal port 80, which i do not want to
does anyone has an answer to this question? i made several tries googling this problem, but didnt find a proper solution
regards :)
i want to run my http server in my local lan on port 8080 and would like to reach it at port 80 from wan
so i first tried to do that with iptables with the following commands:
# iptables -I INPUT -p tcp --dport 80 -j ACCEPT
# iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to 192.168.1.1:8080
but this does not work in the way i expected it to be, because it forwards my traffic to the internal port 80, which i do not want to
does anyone has an answer to this question? i made several tries googling this problem, but didnt find a proper solution
regards :)