by adontz · 9y ago · 0 comments
Linux: iptables -t nat -A PREROUTING -p tcp -s 192.168.20.200/0 -d 192.168.0.100/0 --dport 8080 -j REDIRECT --to-ports 20000
Windows: netsh interface portproxy add v4tov4 listenaddress=192.168.20.200 listenport=8080 connectaddress=192.168.0.100 connectport=20000 protocol=tcp
Use Keepalived (http://www.keepalived.org/) for HA and health checking or use Gorb (https://github.com/kobolog/gorb) and you can dynamically change services / backends using a REST API.
-s 192.168.20.200/0 -d 192.168.0.100/0
That sounds wrong.You probably meant /24 or /32. Or you meant to not write anything to not filter it at all.
Still, I agree.