iptables ports forwarding on eth0:1
I've access to an external device web page on 127.0.0.1:10080 (this is done by a tunnel from this device and my computer using ssh) and it's rightly working :D .
I've create a virtual interface eth0:1 by configuring the /etc/network/interfaces file.( address: 192.168.1.3 )
I would like to access to the web page by using the 192.168.1.3:80 address.
This the script i've made:
But it's not working :confused: , is somebody can help me?
# clear routes
iptables -t nat -F
# nat configuration
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.3 -j MASQUERADE
iptables -t nat -A PREROUTING -i eth0 -d 192.168.1.3 -p tcp --dport 80 -j DNAT --to 127.0.0.1:10080