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

SSL VPN connection works WITHOUT corresponding firewall rules

Hello,

I am running sophos utm home 9.501-5, and have a simple external/internal interface setup with my external IP being a valid public IPv4 address.

I have created an SSL VPN profile with the "auto-firewall off" setting. My goal was to only allow remote SSL VPN access from two specific subnets IPv4 Internet subnets. In my firewall ruleset i only have an explicit deny any source/service rule for all incoming traffic to my external interface, and no other rules. At this stage i have not created a specific rule to allow the remote vpn connectivity from the two specific internet subnets.

Upon testing the SSLVPN connectivity at this point i was surprised to find that it establishes correctly, apparently without a relevant firewall rule. Furthermore, the firewall log does not show any traffic coming from the source IP of my host on the internet for this VPN connection (yes the 'log traffic' option is enabled on my deny any/any firewall rule).

My question here is how and why is this VPN connection establishing? My deny any/any rule should be dropping the incoming VPN connection attempt, as it correctly does for all the other incoming traffic.

The answer may be that the order of operations in a packet flow through the UTM processes VPN traffic before evaluating firewall rules (this defies logic...my logic anyway), but if this is the case then i would ask:
1) What is the point function of the "auto firewall on/off" setting when creating an SSLVPN profile?
2) How do i allow only specific subnets to connect to the VPN and deny all others?

If anyone is able to shed some light here it would be greatly appreciated.

Thanks



This thread was automatically locked due to age.
  • Hi, Jayson, and welcome to the UTM Community!

    This is a corporate tool, and not some version simplified for home use.  All traffic not explicitly allowed is dropped, so your firewall rule only eliminates the drop messages one would normally see in the Firewall log file, so I would delete that rule.

    WebAdmin is a GUI that manipulates databases of objects and settings.  A single change there can cause the Configuration Daemon to rewrite hundreds of lines of the code used to run the UTM.  Firewall rules created automatically by WebAdmin are considered before any manual rules you create - see #2 in Rulz.

    When you enabled your SSL VPN Profile without selecting 'Automatic firewall rules', you only prevented the VPN client from accessing the subnets in 'Local Networks', so you will want to select that to start.  In order to block everything but two public subnets, you must use two NAT rules in order (again, see #2 in Rulz):

    1. NoNAT : {Group containing subnets} -> HTTPS -> External (Address)
    2. DNAT : Internet -> HTTPS -> External (Address) : to {non-existant IP}

    Instead of HTTPS (TCP 443),  I prefer to use UDP 1443 for a faster connection that doesn't conflict with other uses of HTTPS on the UTM.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi Bob, Appreciate the reply. I always prefer to define an explicit deny-any rule at the bottom of a firewall ruleset, as opposed to using the implicit deny any, as i want to track hitcounts againt it. In this case i have just ticked the 'log traffic' option on the rule so it does indeed log every packet in the firewall log.

     

    Thankyou for your suggestion about the NoNAT and DNAT in order to achieve filtering on which subnets are allowed to connect to the VPN. I have implemented this and it is working as desired.

     

    Cheers

  • A logged explicit Deny rule reduces the information in the Firewall log: Packetfilter logfiles on the Sophos UTM.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hi Bob,

    Your original statement was that an explicit deny any rule "eliminates the drop messages one would normally see in the Firewall log file"....i just wanted to point out this is not necessarily correct if you tick the 'log traffic' option on the rule. Whether it reduces the info in the firewall log or not i do not know.

    I have read through the link you provided in your previous message and cannot identify where it is stating that an explicit deny any rule will reduce the information in the log file. Can you advise exactly what information is excluded from a firewall log with an explicit rule vs. a firewall log with the implicit deny rule?

    I have compared both of these logs below by turning my explicit deny rule off, and cannot see a difference either (I have sanitised the source, destination, and hostname):


    2017:07:16-16:44:30 HOSTNAME ulogd[1876]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="60001" initf="ppp0" srcip="1.1.1.1" dstip="2.2.2.2" proto="6" length="52" tos="0x00" prec="0x00" ttl="236" srcport="443" dstport="32985" tcpflags="ACK FIN"

    2017:07:16-16:44:39 HOSTNAME ulogd[1876]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop" fwrule="3" initf="ppp0" srcip="1.1.1.1" dstip="2.2.2.2" proto="6" length="52" tos="0x00" prec="0x00" ttl="236" srcport="443" dstport="32985" tcpflags="ACK FIN"

     

     

     

     

  • In the link I provided, you see that fwrule="60001" is a drop out of the INPUT chain.  In the case of an ACK FIN, that will always be true.  If this were an incoming SYN packet that you meant to DNAT to an internal device, 60001 would indicate that the destination in your NAT wasn't an "(Address)" object on the External interface.  60002 would indicate a drop out of the FORWARD chain - that the Service was incorrect in the automatic or manual firewall rule.  See #2 in Rulz.

    Cheers - Bob

     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA