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 specific IP addresses

I was after some advice as to the best method of blocking web access from specific IP addresses to my web server, that is located in a DMZ.
Currently I do not have the HTTP proxy enabled.


This thread was automatically locked due to age.
  • Hi, always check the proxy, packetfilter, and IPS logs first when trying to track down a blocked address.

    Barry
  • Coder, I was pretty sure my PS wouldn't apply to you.

    I think I gave the right prescription in my prior post.  As Barry explained before that, there's no point in trying to create a packet filter rule for packets that are handled preemptively by a proxy.

    Cheers - Bob
  • I guess I am confused about exactly what the transparent mode skiplist does. 

    I will be testing later this week, but if I add undersierable IP's to this skiplist, then I assume the proxy settings have no effect on these IP's.  Not that it would matter in my case, since they are blocked... but If I added some sites that I needed to get to, but did not want to proxy it would matter. 

    Do the proxy settings mean zip for a site/IP/URL is in the skiplist?

    Thanks,

    C68
  • OK.  Based on my testing, this is what I am seeing for a user request flow through Astaro. (See image for flow chart.)

    Let me know if this is wrong!

    Thanks,

    C68
  • That looks like how I understand it.

    My interpretation of the 'Allow HTTP traffic for listed hosts/nets' checkbox is that it creates the PF rules needed to allow such traffic; I don't know if it checks to see whether it only needs to allow '[host] -> HTTP -> Any' traffic, 'Any -> HTTP -> [host]' traffic or just does both.

    I haven't experimented with it, but I wonder if anyone has tried this...

    If you are in a non-transparent mode and want to offer unproxied traffic for some remote hosts without forcing the users to switch back and forth between proxied-8080 traffic and unproxied-80 traffic, could you use a NAT rule like 'Internal (Network) -> [Port 8080] -> [selected hosts] : DNAT to [Port 80]'?  That won't work if DNAT comes after the HTTP Proxy or if the HTTP Proxy considers the source port instead of the destination. [see PS]

    Cheers - Bob
    PS The answer to my question in this post is "No."  DNATs do indeed come before the Proxy, but, in non-Transparent modes, the Proxy resolves the FQDN in the URL.  In Transparent modes, name resolution is done by the client, so the host's IP is known before the proxy receives the HTTP command.
  • Well, I will be in transparent with authentication or just transparent.  I want the kids to have to log in so I can really lock them down. with a block everything but these sites setup. 

    It took a few trys but by adding, for a test using MSN.com,  65.0.0.0/8 (PF rule 2)to my block by default list and adding the block by default to my proxy exception list and then adding in four IP's for MSN that allows these four IP's...(PF rule #1)  I was able to get to MSN.com... but it was slow to come up.  No biggie though.  The only exceptions I anticipate will be for Kaspersky's websites.  I won't need to go there very often.

    That little flow chart should be helpfull to beginners, like myself.

    Thanks,

    C68
  • In Post #6 on Page 1 of this thread, BigO suggests that it would be desireable to be able to have a list of IPs in a Network Definition, since, at present, you have to create a 'Network Group' of individually-defined hosts.

    In fact, if an FQDN exists with multiple IPs, you can use it to create a 'DNS Group' Network Definition that is a list of individual IPs.  So, an alternative could be to use that if you have an easy way to generate multiple A records for an FQDN on your internal name server.  On a Windows server, you can create a batch file using Excel.  For example, the following commands create A records for sample.domain.local=10.10.0.12, .13 & .19 on a server named Server1:
    C:>dnscmd Server1 /recordadd  domain.local sample A 10.10.0.12
    
    C:>dnscmd Server1 /recordadd  domain.local sample A 10.10.0.13
    C:>dnscmd Server1 /recordadd  domain.local sample A 10.10.0.19


    Cheers - Bob