In case someone else is looking for a way that actually works. Though @HorsePunchKid is right in his suggestion, I've found this walkthrough that fills in the missing steps:

http://www.debuntu.org/how-to-redirecting-network-traffic-to-a-new-ip-using-iptables/

In essence:

Enable IP Forwarding:

sysctl net.ipv4.ip_forward=1

Add your forwarding rule (use n.n.n.n:port):

iptables -t nat -A PREROUTING -p tcp -d 10.0.0.132 --dport 29418 -j DNAT --to-destination 10.0.0.133:29418

Ask IPtables to Masquerade:

iptables -t nat -A POSTROUTING -j MASQUERADE

And that's it! It worked for me in any case :)

 

 

https://askubuntu.com/questions/320121/simple-port-forwarding

相关文章:

  • 2021-11-19
  • 2022-01-27
  • 2021-07-27
  • 2021-08-14
  • 2022-12-23
  • 2021-07-13
  • 2021-12-21
  • 2021-08-24
猜你喜欢
  • 2021-12-11
  • 2021-12-24
  • 2022-01-13
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案