This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Blocking an external IP or IP range

Apologies - this is just so basic. 

My network use report list an external server consuming bandwidth that I don't trust. I simply want to block all traffic to and from that server.  The network in question has the IP address 117.18.232.x where x is subject to change.  

1.  I created a network definition for 117.18.232.0/24 called "Bad"

2.  I put two rules at the top of the Firewall 
a) Any -> Bad then drop  and
b) Bad -> Any then drop,  
with Any as the protocol in both cases. 

I have read various blogs on this problem. 

1. I have no SOCKS Proxy defined (not even sure what that is)
2. I have a number of DNAT directives and NAT of course.  

That's it.  The system is pretty much out of the box. 

Naturally I am writing this all because the firewall directives do nothing. 

How can I block a pesky IP address?

Any help appreciated. 

Regards

Chris[:S]


This thread was automatically locked due to age.
Parents Reply Children
  • Bob, 

    Thanks for your comment - your rule #2
    Rule #2:

    =======
        In general, a packet arriving at an interface is handled only by one of the following, in order: the connection tracker (conntrack) first, then DNATs, then VPNs and Proxies and, finally, manual Routes and manual Firewall rules, which are considered only if the automatic Routes and rules coming before hadn't already handled the traffic. (see attachment below) 
    =======

    What I have done now is:

    1. Reboot to kill any connections
    2. disable any DNATs (these pointed to non existent devices anyway), 
    3. disable the VPN's my son set up some time ago (he understands this stuff), 
    4. Checked that there were no SOCKS Proxy settings (found the settings area but nothing was set)
    5. Checked that there were no routes defined

    I got pretty excited at one point because the Firewall live log showed that one of my rules did indeed force a drop of the offending packets.  However I noticed after a period that the network usage attributable to host 117.18.232.x had continued to increase and that the firewall was no longer reporting dropped packets. 

    The cunning devils changed their host address to 117.18.237.x

    I have now amended the host / network definition to be 117.0.0.0/8.  The relevant firewall rules are:

    Any (Any protocol) to 117.0.0.0/8 then DROP,  and
    117.0.0.0/8  (Any protocol) to Any then DROP

    I would use country filtering except ASG cannot determine the relevant country.  Various DNS Lookups tell me the IP probably originates in central China. 

    So what seemed like a straightforward way to stop these pests is clearly not so simple. 

    Any ideas would be appreciated. 

    Regards

    Chris Bragg
  • Bob, 
    I sent you an email yesterday - maybe I should have responded with a quick note.
    Regards
    Chris Bragg