8

Iptables NAT forwarding - how to block all but one IP

view full story
linux-howto

http://serverfault.com – I've got a small network, two interfaces, eth1(local, internal range 192.168.150.0/24) and eth0 external, static ip. I wish to set up nat forwarding for the internal network but allow them to only connect to an external server 209.60.x.x and reject connections to all other external ips. How do i only allow forwarding/nat to ip 209.60.x.x ? Edit : Problem fixed with a iptables -I FORWARD -s x.x.x.x -j ACCEPT followed by iptables -P FORWARD DROP rule. (HowTos)