Answer the question
In order to leave comments, you need to log in
How to forward a port to another network in iptables?
Hello !
Is it possible to make a port redirect to another network using iptables.
For example
Network interface
abcd/24
All that comes to port xxx is redirected to ip
wxyz
port yyy
As far as I understand iptables can only redirect within its own subnet.
-A PREROUTING -d 192.168.249.253 -p tcp -m tcp --dport 58641 -j DNAT --to-destination 192.168.254.150:58641
Or do I need to write some other rule besides DNAT ?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question