Using iptables, how do I drop an entire subnet that I am connected to, except for the gateway, in a manner that still allows me to retain my connectivity to it?
I'm looking for two iptables rules, one for just incoming, and another for outgoing.
For example, let's say I want to connect to gateway 10.0.0.1, with an IP .159
I want to block everything else, and need to retain connectivity, DNS is set to gateway, 10.0.0.1.