I heard that in a routing table, we can drop packets. Does that work like a per-IP-address firewall to prevent access to certain range of IP addresses from the local device?

In comparison, does iptables work as a per-port firewall to prevent access to certain port from the local device?


  • 1
    Do you have a reference for the “I heard that ...” part? Regarding iptables, have you considered the usefulness or otherwise of the -s and -d parameters? – Stephen Kitt Mar 28 at 13:57
  • How does a per-IP-address firewall work? How does a per-port firewall work? I do not believe it is possible to block local system connections to local ports using iptables. I can't think of a use case where it would be necessary to actively block/drop/deny access from a local process to a local port. It sounds like you are discussing using network level activities to try and restrict system process functions. That dog won't hunt. – 0xSheepdog Mar 28 at 14:33
  • @StephenKitt Yes, I have. See my update. – Tim Mar 28 at 15:11
  • 1
    @Tim so why would iptables support specifying source and/or destination addresses if it’s a per-port firewall (whatever that means)? – Stephen Kitt Mar 28 at 15:31
  • Does a "per-port firewall" mean anything? What? – mosvy Mar 28 at 19:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.