I have a server with 2 interfaces. a small netework connects to eth0 and gets out to internet on eth1. To allow 1 ip to nat I use
iptables -t nat -A POSTROUTING -o eth1 -s 192.168.0.23 -j SNAT --to-source=23.x.x.x
I would like to add a rule that allow a single ip do nat and block the others already existing in iptables(without deleting them)
iptables -t nat -A POSTROUTING -o OUT_IF \! -s ip_sursa -j SNAT --to-source=x3.xxx.1xx.1xx -j DROP
Or, to allow only 1 ip to pass over eth0 to eth1 and do nat.