Answer the question
In order to leave comments, you need to log in
How to properly configure iptables port forwarding?
We have a linux machine with two interfaces wlan0 ip 10.8.0.1 and eth0 ip 192.168.0.10 need to forward the port from wlan0 to eth0 to ip 192.168.0.2
Tried:
iptables -t nat -A PREROUTING --dst 10.8.0.1 -p tcp -m tcp --dport 2080 -j DNAT --to-destination 192.168.0.2:80
iptables -I FORWARD -i wlan0 -o eth0 -d 192.168.0.2 -p tcp -m tcp --dport 80 -j ACCEPT
doesn't work.
net.ipv4.ip_forward is enabled.
Answer the question
In order to leave comments, you need to log in
And this Linux machine is a gateway for one of the subnets or what? If not, then it is necessary to reverse forward to do otherwise, asymmetry and tsp will not be established in this case
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question