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.
  • Chris, consider #2 in Rulz - any luck with that?

    Cheers - Bob
  • 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
  • Hey Chris,

    Just for reference, those IP blocks may not be as bad as you think. They belong to Edgecast Networks which is a Content Delivery Network (CDN) much like Akamai. Check out: EdgeCast Networks - Wikipedia under their notable clients list.

    From what I can see, 117.18.0.0/16 belongs to Edgecast and most CDN networks are designed such that a specific IP can appear in several places worldwide, depending on your location, making geographic lockdown useless.
  • Andrew, 
    Thanks for your  comment above.  I am somewhat reassured that the site is safe. At least one IP Lookup solutions pointed to Edgeware and I checked that name out, but most could not report anything about the IP other than a location in Central China - thus my suspicions.  I will now move forward with fewer concerns, but still would like to know how to block the site just so I can do this when I hit a real problem.  My latest attempt involves defining a "Blackhole" route for the network.  I'll see what that does. 

    Thanks again
    Regards 
    Chris Bragg
  • Bob, 
    I sent you an email yesterday - maybe I should have responded with a quick note.
    Regards
    Chris Bragg
  • Chris, because of #2 in Rulz, you will want to use a DNAT instead of routes and firewall rules.

    Cheers - Bob
  • Bob, 

    Sorry for not quite understanding.  I interpreted your #2 rule as saying that if you have:
    1. No current connection to the offending network / host
    2. No DNATs in place
    3. No VPNs
    4. No Proxys
    5. No static routes

    then the packet should be handled by the firewall (which should prevent any new connection because of the DROP condition on the relevant host/network packet). Is this correct?  

    I guess this issue is pretty central to me ever getting a working understanding  of the ASG security architecture. 

    Regards

    Chris Bragg
  • Bob, 
    Don't worry - I give up. I need to find an IT guru that can look at my system first hand.  Appreciate your comments. 
    Regards
    Chris Bragg
  • Chris, in this situation, #2 means that you can only be guaranteed to block an IP if you use a blackhole DNAT.

    Cheers - Bob