PDA

Bekijk de volledige versie : redirect port 80 from wan to 8080 on lan



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 :)

al37919
01-12-2007, 09:21
try:
iptables -I INPUT -p tcp --dport 8080 -j ACCEPT

eitsch
01-12-2007, 13:25
nope, does not work the way i want it to do
this only accepts incoming requests on port 8080, but the thing is, that i want to access the device from wan side through port 80
the reason for this is, that my company internet access only allows connections out of the company to port 80s

regards