Results 1 to 3 of 3
I have a eth0 ( outside ip ) and a eth0:1 ( lan ip/192.168.0.x ) I want to take all 8080 traffic from out side and direct it to 192.168.0.21:8080
...
- 08-16-2010 #1Just Joined!
- Join Date
- Aug 2010
- Posts
- 3
need iptable help forwarding ip.
I have a eth0 ( outside ip ) and a eth0:1 ( lan ip/192.168.0.x ) I want to take all 8080 traffic from out side and direct it to 192.168.0.21:8080
I tried
and figured I may needCode:iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 8080 -j DNAT --to 192.168.0.21:8080
but its not working. What did I do wrong? Do I need to do anything with apache2 as it shows the default it works page on 8080.Code:iptables -A FORWARD -p tcp -i eth0 -d 192.168.0.21 --dport 8080 -j ACCEPT
- 08-16-2010 #2Just Joined!
- Join Date
- Aug 2010
- Posts
- 3
Well I made it work on 3000 like so.
Code:iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 3000 -j DNAT --to-destination 192.168.0.21:8080 iptables -A INPUT -i eth1 -p tcp -m tcp --dport 3000 -j ACCEPT
- 08-17-2010 #3
Now look at the 2 setups and see what is different between them. Then make sure what ever program you have listening on 808 is also listening on the 8080 on the ip address you want to redirect to.


Reply With Quote