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

Firewall Confusion

Sophos Community,
 
Let me begin by saying that I can be very long winded and don't normally post in general so if this is in the wrong place on the forum or includes too much information please excuse me. 
 
Let me begin with the "Long version" as it contains what I consider to be pertinant details about my network and situation. Please CTR+F to "Short Version" if you would like to see only my questions.
 
Long Version

I am new to Sophos but not new to networking or the search for an excellent offering as an open source or Home edition UTM. I have used Dansguardian, PFsense, ipcop, Mikrotik, Shade (what a joke), and Untangle. So far my favorite simply from ease of use is the Untangle software but it does not offer as much as the Mikrotik can if you know enough or that Sophos offers out of the box and espically if you consider its potential.
 
My network is as follows. I work for my ISP and we have fiber terminated at the office which then gets rebroadcasted via wireless to my home. From there the "modem" or "radio" which is completely bridged is plugged into the external interafce of my Sophos box which is an old repurposed Dell. I believe I bought it in '06 but that could be off, either way it has more than sufficent hardware to run just about any offering you can think of in this case and sports a 1TB drive. From there I have a secondary NIC that goes through standard ethernet to a Netgear EoP (Ethernet over Power, it uses the existing power lines in the home to bring the signal to its twin in another part of the house) Out of the second EoP it goes to standard ethernet to Eth1 on my RB2011UAS-2HnD-IN which currently only serves to wireless clients via its 1000mw radio card.
 
Through this setup I can pull my full speed that I get from the shop of 15Mbps at about any given time unless I enable download throttling or any QoS. My Mikrotik is completely bridged, the clients get DHCP form the Sophos UTM. 9.100-8 with an update pending.
 
 
To begin I have a few examples of issues that I struggled with handling with my Sophos setup. 
 
1. Xbox Live
 
Like many home networks I have an Xbox360 and other gaming systems. So far I have only tried tackling the 360. As I am sure most of you are aware for optimum performance on the Xbox Live servers a few specific ports have to be open.
 
Port 88 (UDP) 
Port 3074 (UDP and TCP) 
Port 53 (UDP and TCP) 
Port 80 (TCP)

Reference Here --
Xbox Network Ports | Xbox 360 Network Ports | Xbox LIVE Network Ports - Xbox.com


Initially after adding rules in my firewall I was not able to get the fabled "Open NAT". I even tried an Any to Any to Any rule as rule 1. (With which I was still dropping a ton of packets and not only on the aforementioned ports... I diasabled all of the other filtering services and still saw the same issue) It was only after finding another forum (or perhaps it was a post on this forum I forget) that showed me how to use the DNAT rules for NAT that I was able to make sure that the traffic was handled properly and allowed the ports to be opened up so that I could have Open NAT. 
 
2. Ultrasurf
 
Let me begin by saing that I acknoledge the difficulties involved in blocking this program and other programs of this type. My main goal is to discourage use of this program entirely from the network level. I do not believe in the lost cause of blocking Untangle but that is not the reason for this post.
 
In an attempt to be brief I will boil this down some. Ultrasurf creates a proxy on the localhost using port 9666 which that traffic never sees the network level. From there using HTTPS it establishes a secure connection to one of its many IP's out of at least 2 known networks. 
 
65.49.0.0/17
204.107.140.0/24
 
Reference Here --
How to Detect and Block UltraSurf program traffic - MikroTik Wiki
 
I defined both networks as Ultrasurf1 and Ultrasurf2 respectively. I would think that if I put in a rule that said Source: Ultrasurf1 using HTTPS (Or Any) going to Internal Network (or External IP) and visa versa that all traffic...at the very least on those networks...would be killed. Well I have 12 individual rules, one for each of the above going both ways and I can still go to What Is My IP Registered | Shows Your IP Address. while using Ultrasurf and be on the first network...it does not even stumble.
 
3. Web Filter
 
I blocked Uncatagorized web pages with the web filter and it blocked some local pages (to be expected) but when I added them to the Always Allow URL list they were still blocked....what gives?
 
Those are all of the Examples I have.
 
Short Version
 

Questions
 
1. How does NAT effect my firewall rules? Will I always have to change my NAT to make some rules work?
 
2. Is Sophos a Top Down filter? I had read that it was and it seems to be but I put in that Any to Any to Any rule as rule 1 and disabled all of the other services and still had no Open NAT and was dropping packets left and right (on the Firewall Open Log).
 
3. Is the Firewall broken or am I missing something? If I make a rule that says no traffic allowed from this source network or to this source network using any service to both the Local Network and the External IP, how in the nine hells is it still going? 
 
4. Do grouped rules work well? Again my understanding fo the firewall is that the first rule that matches is the rule that is used in a top down order. So can I group source and destination and services together to eliminate multiple rules where 1 or 2 would work just as well or is there a good reason to split them up? Will using more rules slow down the Filter? 
 
5. What is the color coding for? I can't find any documentation for this. I assume it is to tell the administrator "used", "being used", "never used", or other things like that to tell the admin how effective the rules are. 

**Nevermind this is to show groups, I did some more digging**
 
6. I have what I consider to be some pretty strict settings against people who would try and get around the filter which is currently my main focus. 
Anonymizers
Anonymizing Utilities
Are both being blocked by the Web Filter, all VPN, P2P, and Proxy services are blocked in the Application filter, and I have a few generic rules in my firewall to prevent Ultrasurf at the moment. And I have succeeded in blocking programs like ProXPN (a VPN tunneler to anonymize traffic) with Sophos but for me if you can do a 5 Min Google search, find Ultrasurf, and dodge the filtering, then all of that work is for nill. So my question, What more can I do? Is there a way to do MIME types or Add signatures for application (layer 7) filtering? As I understand it Smoothwall and SonicWall and other solutions block it pretty easily yet I can find no documentation or manage it myself.
 
Well I have more questions but I had better call it a day. Sorry if there are any spelling or grammical errors, I typed this up once already but tried to submit it and got an Authentication Ticket invalid or some crap and had to retype it all again....
 
Thanks for anyone who took the time to read this and double thanks if you respond with advise!
 
Bergie


This thread was automatically locked due to age.
  • I think you need to have a read of the administration guide for the various issues your talking about to get a better understanding.

    http://www.sophos.com/en-us/medialibrary/PDFs/documentation/utm9006_manual_eng.pdf

    You only need to create internal > any > external IP (the internal will always needs to initiate the connection)

    If its not being blocked, then check the rule order make sure its at the top, also check ur firewall logs/web filtering logs live and see when the connection is made what it shows. If you paste it here that will help.
  • if I have a source rule  ---> HTTPS ---> External WAN address..... that should kill it right? But it does not.

    Ah, I didn't think that through.  Matt's right that the correct solution is the rule that blocks the traffic to Ultrasurf.  This is a "stateful" firewall that keeps track of connections.  When a packet arrives at an interface, it will be accepted if it is a part of a known connection - that occurs before any (manual or automatic) Firewall rules are considered.

    I don't understand why you would be using the External WAN in any rules.  I bet you want the "Internet" object instead.  This could be part of your problem.

    Cheers - Bob
  • Matt/BAlfson,

    That does clear it up some. So my goal should be (unless it can be accomplished in a better way in the firewall or elsewhere) to create a high priority rule so that it gets hit first that looks something like this.

    Internal > HTTPS > 65.49.0.0/17

    I am fairly certain that I have done this but everything you are saying makes a lot of sense. 

    So basically I will only use rules with the External WAN address if I am trying to create a rule that only effects the UTM in regards to the internet and I will rarely need an option of that type I would think.

    Matt, I have not had a chance to read that manual yet but thank you for posting the link, rest assured I will learn what I can from it once I have the time.

    I will experiment and let you know how it goes. 

    Best Regards,

    Bergie
  • Guys,

    Thanks for your ever vigilant assistance, I am now able to get the firewall to block traffic from the internal network using the HTTPS service to the first and second known Ultrasurf networks. I have seen it blocked in the firewall logs and armed with the new knowledge I have gained I'm sure if I try hard enough eventually I will at a minimum discourage future Ultrasurf users on the network.

    Sadly though, I believe it is using another unknown network to establish its network and from there once it has created the HTTPS connection it is reverting back to its two other networks (I still see the blocked network when I go to What Is My IP ® | Shows Your IP Address.) but as it is a stateful firewall and from Matt and BAlfson I can appriceate now why I am seeing it blocked and still having that result.

    (Ultrasurf is believed to have a Google Document with an ever evolving list of networks to use and as it establishes an HTTPS connection to Google to obtain them this service will be impossible to block without blocking, or allowing explicit access to trusted users/networks, Google.....or some type of MIME type or Signature based blocking. Is sophos up to the task?

    Another question I had...

    I tried to create a NAT rule like the following.

    Group: Block Rules
    Position: Group Top
    Rule Type: DNAT

    Matching Condition
    For traffic from: Internal network (also tried "Any") I only have the one network for reference.
    Using Service: HTTPS
    Going to: Ultrasurf1 (first known ultrasurf network)

    Action
    Change Destination to: (Blank....should I add something here?)
    Change Service to: HTTP

    The goal is to either confuse Ultrasurf into not working or at the least allow Sophos UTM to see the traffic and let its other filters do their job. I'm sure there is a more elegant solution than mine but its the first thing I thought to try.

    My question is why can't I create this rule? It's not like I'm killing my HTTPS access to the UTM, the destination is specifically not the UTM, also I don't lose connection. I don't get any errors, it goes through as if it was created then the rule simply does not exist. Any clue what is happening?

    Best Regards,

    Bergie



    ***Edit***

    When I clone an existing rule and leave it in the same group it lets me make the rule...I double checked and I don't have the search filtered so I was not pulling a completely dumb move but can I only have one group? Why have multiple group options at all? Is it a group conflict with another group in another place on the filter?


    ***Edit***

    Progress is minimal but happening. I'll post when I have something. Let me plug away at it for some time until I hit another wall I can't figure out myself then I'll ask smart guys [:)]
  • Action
     Change Destination to: (Blank....should I add something here?)
     Change Service to: HTTP

    Instead, try:

    Action
    Change Destination to: {non-existant IP}
    Change Service to: {Blank}



    The real answer is to use the techniques in "Configure the HTTP/S Proxy for a Network of Guests" and then get rid of the general rule that allows HTTPS.  That means using a Standard-mode Profile so that "Anonymizers" can be blocked whether using HTTP or HTTPS.  You will likely need an Allow rule for HTTPS for some banks and other sites that don't play well with proxies.

    Cheers - Bob
  • Would allowing Sophos to scan the HTTPS with the web filter help? I would think that that basically makes the traffic the same as HTTPS as far as the filter is concerned its only a matter of getting the clients to accept the new Cert. I think I am going to look through your documentation and see if I can apply that along with this if its not already included.

    Best Regards,

    Bergie

    **Side Note** 

    I don't want my hand held, I love getting advice from people who are willing to share and take time out of their day to assist me, so I apoligize if I got a tad "needy". Normally I don't even ask others for help I just plow ahead until I accomplish whatever I was trying to do...in this case its been over a year of frustration and I am eager to accomplish my goal and I can almost taste it now.

    So on that note I head out, passion renewed, to get my network where I want it [:)]

    Thanks!
  • Bergie's next post was about Web Protection, so I moved it to its own thread in that forum: https://community.sophos.com/products/unified-threat-management/astaroorg/f/55/t/45919

    Cheers - Bob
  • So far as I can tell the advise you two gave me worked! I'm pretty confident that what really did it was taking out the allow all rule created by the filter for the "web surfing definition". I was even able to keep HTTP and HTTPS in it so I don't have to create an HTTPS white-list. Thanks so much for the help guys. Consider this thread closed! If anyone else needs help getting Ultrasurf or Freegate or Proxify  blocked and can't manage it using the help this post provides please just let me know and I'll do my best to pass on the help!

    On a side note, BAlfson...I know you have been saying this from the beginning...sorry I was slow to accept that it was the best approach.

    Best Regards,

    Bergie