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

Warning: Newbie Question--Need help blocking LAN ip

So, I installed and have been playing around with Sophos UTM 9 for some days now--had never even heard of this prior to a week or so ago.  I have the limited small business version running on an old Dell Optiplex 755 box.

I do not have managed switches so I can't do vlans, but I wanted a way to block certain areas of the network from others.  So instead of creating two /24 networks, I created one /23 and will manually separate the hosts (via static dhcp entries) on one half of the network or the other.

e.g. 192.168.0/23; so I would make one "network" 192.168.0.0 and the other 192.168.1.0.

For the life of me, I cannot get the first half of the ip range to NOT have access to the second half.  Is this just not possible?  Or am I missing something?

What I have done: Setup two ip ranges and then created a firewall rule stating that if any host within range 1 using any service tries to access a host within range 2, the packets should be dropped.  I then put this at the top of the firewall list.  However, I can assign a laptop an ip in the range 1 scope and it still is able to access a network share on a desktop within the range 2 scope.

Can anyone let me know what I might be missing??

Thanks very much in advance kind sirs and ma'ams


This thread was automatically locked due to age.
  • Hi Seventh,

    What netmask are you using for your clients? Netmask determines if the client device has to go through the UTM or not so an IP of 192.168.0.113/23 accessing 192.168.1.124 won't even bother with the UTM (it's in the subnet), whereas a client with 192.168.1.113/24 will go through the UTM (it's default gateway).

    One thing you can try, is setup the 192.168.0/23 as a /24 and add the 192.168.1/24 network in by setting the LAN interface to have an additional address of 192.168.1.1/24. Only catch is you have to have static IP addressing on the second subnet, but clients on the 192.168.0/24 subnet are forced to use the UTM.
  • Hi TheDrew,

    Thank you much for the response!

    So, I'm using a /23 network to have enough IPs that ordinarily would be in two /24 networks (but my situation could be for someone trying to split up a class /25 network into two /26 networks, etc., etc).  All in all I was just hoping to somehow disallow 1/2 of an IP space from accessing the other 1/2.  

    I currently have two NICs, one functioning as a WAN going back to ISP and the other for LAN going back to switches which are non-managed/cannot do VLAN duty.  

    What you say about the netmask does make complete sense....i told you this was a newbie question [:)]  But I truly do get it now, if the host I"m trying to block with UTM is on the same subnet as the other host, there is no reason for the host to go to the GW (to get to a different subnet) so it never gets blocked.  

    I like your idea about adding an additional address to the LAN interface!  I have been playing around with it, but cannot get it to work....hopefully someone else can chime in.

    I'm able to add the additional IP address (e.g. 192.168.3.1 /24) to the LAN interface and I'm able to setup a dhcp pool handing out IPs for that /24 network.  However, there is an issue with the gateway functionality--the 192.168.3.1 ip address is not an actual gateway.  When dhcp hands out an ip in that range to my laptop (192.168.3.2), I correctly get the ip address assigned and am able to ping the 192.168.3.1 address, but I am unable to get out on the internet as again it is not truly a gateway.

    I created a DNAT stating if anything tries to access the 192.168.3.1 IP to send it to the actual internal gateway, but that does not seem to be working.  And attempting to put the true gateway address into the gateway field of the dhcp pool doesn't work as its on a different subnet.

    Is there anyway to get this newly added secondary interface to act as a gateway??  If so, I think I can get this working!!
  • Step 2 [:)]

    For any traffic bound between subnets rules need to be added to permit traffic as the utm runs on an explicit allow model.

    For Internet access for the new subnet you'll want to duplicate the masquerading rules already in place for the first subnet, and either create new allow rules in the firewall or add the subnet as a source address in existing rules.
  • TheDrew,

    Thank you much for your help again!

    OK, I'm hoping I'm getting closer, but at this point, still no internet access.  Here's what I've done...

    ---
    **set a new fw rule stating that the secondary subnet(192.168.3.0 /24) can access the original subnet (192.168.1.0 /23)

    **set a new fw rule stating that the secondary subnet(192.168.3.0 /24) can access "any" IPv4 via "any" service (for internet access?)

    **created a new masquerading rule for the secondary subnet to use the wan interface with the "primary address"

    **added new subnet to allowed networks for DNS

    **created a dhcp pool for the secondary subnet(192.168.3.0 /24) which has 192.168.3.1(the ip address added to the interface) as the gateway and dns.  I also created a dnat rule stating any traffic going to 192.168.3.1 should be redirected to the ACTUAL gateway and dns (192.168.1.1).  

    With this, still have no internet access.  Everything internally works (a system on the secondary subnet can access systems on the orginal subnet), but I just can't get "out".  I can do a nslookup for google.com and get a response, but if I try to ping google.com it times out.  

    I then went back into the dhcp pool and set the gw/dns to the ACTUAL internal (192.168.1.1) and still nothing.

    Any ideas?
  • Is the gateway at 192.168.1.1 a different box from your UTM? If so, it sounds like your NAT rules might not be quite right...

    Based on what I understand from your posts, I think you need two NAT rules in the following order:

           1) No NAT: 192.168.3.0/24 -> 192.168.1.0/23 (any service)
           2) SNAT: 192.168.3.0/24 -> Any IP (any service)

    You probably already have the correct firewall rules in place, but you could tick 'Automatic Firewall rule' if you want to be sure. Also, remember to set the default gateway in your DHCP configuration back to 192.168.3.1.

    If this still doesn't work, it might be helpful if you can post a traceroute from a machine behind the UTM (with a 192.168.3.x IP address) towards www.google.com or 8.8.8.8 so we can see where it might be failing.
  • Hi Seventh,

     I also created a dnat rule stating any traffic going to 192.168.3.1 should be redirected to the ACTUAL gateway and dns (192.168.1.1). 


    Try deleting that DNAT rule as it's not doing what you think it's doing. 

    As far as the UTM is concerned, once you setup the secondary address of 192.168.3.1/24, that address and subnet is now part of the internal routing table and the UTM doesn't need to be told how to route outbound traffic, the masquerade & firewall rules handle that.
  • TheDrew,

    thanks again.  I attempted the above the same day and didn't have any luck.  I was going to attempt a few things again on my own before I posted (so I would not continue harassing you), but I did not want you to think I just ducked out so to speak.  So, I did get and attempt the step above, I will try playing around with a few more things and I will post an update as soon as I can.

    Thanks much!