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

VLAN setup on Sophos UTM 9 with Cisco SG500 layer 3 switch

Hi,

I am new to the forum, so I apologize in advance in case of writing smth stupid.

Our goal, is to create 3 VLANs and seperate the networks between different departements.

 

VLAN1 (which is the default VLAN in the switch) - will be used for IT department and the management.

VLAN100 - will be used for business .

VLAN200 - will be used for guests who need to connect to the internet through WiFi.

 

I have created VLAN100 and VLAN200, and VLAN1 is there by default.

 

I want to use port 13 for VLAN200 and to connect the Wifi access-point there.

 
The uplink is in port 25.



I did plenty of reading on forums but did not come up to a final useful result.

As BAIfson has pointed out in his answer here: https://community.sophos.com/products/unified-threat-management/astaroorg/f/52/t/29039

There are to approaches for setting up VLANs in a given network, 

1) leave the router to do the routing
2) the layer 3 switch does the routing

I came across this post here: Sophos UTM VLAN Interfaces & Routing on a stick | Network Guy
In my opinion here the router is doing the routing and not the Layer 3 switch? Am I wrong? Can someone please confirm.

When looking at the posts in different forums, to achieve the case where the Layer 3 switch does the routing, something like "allowing multiple subnets in a single interface" has to be done in the router. How can I achieve this with the Sophos UTM 9?

What is the best practice for my scenario? And how can I achieve it?

Best regards,
D


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

    You need a masquerading rule for each internal network,  to the WAN Address.

    And firewall rules. 

    Barry
  • Thank you, that was what I was thinking. I know NAT rules can be a challenge.  Firewall rules are a little more straight forward. I have NAT & DNAT rules to route incomming traffic to servers behind the firewall. Would that be the same? If I copied one of them reules and edit it?

    I will keep reading posts and see if I can find someone's post that has the example I am looking for. I think my key issue is getting the NAT set up correctly and then the firewall rule is easy.

    Chad
  • Hi, masquerading is on another page; you can't copy from other NATs.

    You can use SNAT if you want to assign a different outgoing IP for each system.

    Barry
  • How what is the IP that you use for the VLAN interfaces in your UTM.

    My VLAN 200, has the 192.168.0.1/24 IP address, when I give the 192.168.0.1 IP to the VLAN interface for VLAN 200 in the UTM, I receive the "Duplicate IP address 192.168.0.1 from MAC 00:1a:8c:xx:xx:xx was detected on VLAN 200, port gi1/26", this MAC address belongs to the UTM?

    How do you implement the same case in your router?
  • Hello,

    So now the next 2 questions. What mode of NAT?   NAT, SNAT or DNAT?
    Under the Masquerading tab or NAT?

    In the Masquerading section / tab I made 2 additional entries.
    Network:  Vlan 10(network)
    Position 2
    Interface External (WAN)
    Use address: >
    Comment: vlan 10

    same for my VLan 20 under Masquerading.

    Firewall rule entry:
    Group:  left as is
    position: 7
    Sources:  Vlan 10 and vlan 20
    Services:  any
    Destinations: External WAN (Network)
       Now would I also include Internal LAN (network) assuming I want to talk to or route between Vlans? Or list the individual vlan interfaces?
    Action: allow


    See my next question is, how to set up the NAT part. Do I add the rule under Masquerading as described above or to I click on the NAT tab and create a NAT, SNAT or DNAT instead?

    Then for the firewall rules, Do I have it set correctly to allow Vlans to go out to the Internet? Then what about the other Vlans or to send traffic from one vlan to the other?
    How best to explain, or word the question to you all? I know I need a NAT rule and a outbound / in bound firewall rule, but as far as NAT, what kind of rule and made under what section of NAT? 

    If someone is using 2 or more vlans, could you provide an example of your NAT and firewall rules configuration? Once I know the correct format and where it needs to be configured at I can make and do all I want. Just needing to get the mechanics of it correct.

    A. make interface set for vlan
    B. add the DNS so the vlans can use the DNS of UTM
    C. Add the DHCP for it, each vlan its own I.P. scope
    D. Correctly configure the NAT
    E. correctly configure the firewall rules for out / in  traffic

    Chad
  • Hello BarryG,

    I Have only one, external real world I.P. address. I assume UTM would masquerade all LAN / internal I.P. scopes over the WAN I.P., correct?

    (If I had several external real world I.P. addresses then I would use the SNAT to tell UTM what external I.P. to NAT/SNAT the vlan out?)

    So I am using networks 192.168.2.0/24, 192.168.3.0/24, 192.168.4.0 /24 and 192.168.5.0/24 for each Vlan interface. UTM's DHCP server would be providing DHCP for each network in each vlan which is configured to use. UTM is also acting DNS server for each Vlan and the vlans are in the DNS option / configuration. 

    So if I read your post and understand correctly, I put my NAT/Masquerading settings correctly in / under the Masquerading section and have them correctly configured?
    Network: Vlan 10(network)
    Position 2
    Interface External (WAN)
    Use address: >
    Comment: vlan 10

    same for my VLan 20 under Masquerading.



    Then for Firewall rule:
    Firewall rule entry:
    Group: left as is
    position: 7
    Sources: Vlan 10 and vlan 20 (list all required Vlans)
    Services: any
    Destinations: External WAN (Network) (would I also list the other vlans in this section to allow vlans to pass traffic Between them or just also use "any network" instead?)


    Chad
  • Chad,

    You also could do '{192.168.0.0/21} -> External' in a  single masq rule.  The firewall rule should look like 'Allow : {192.168.0.0/21} -> Any -> Internet'.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Hello and thank you all for assistance. It is up and working. Step by step what I did.

    1. configure interface to be Vlan. In my Case it is eth0 since eth1 is my WAN

    2. Add vlans to the interface. In my case 10,20, & 30

    vlan 10 example:
    Type: Ethernet vlan
    Hardware: eth0 selected
    Vlan tag: 10
    IPv4 address 192.168.2.1
    netmask /24
    Note: each Vlan is given its own IP subnet and I.P. scope in DHCP and the I.P. of the vlan is always on the ***.***.***.1 (at least in my case and examples) so my vlan 20 interface is on 192.168.3.1 and for vlan 30 it is on 192.168.4.1.
    3. Configure DHCP scopes for each Vlan

    choose different subnet for each vlan, vlan 10 is on 192.168.2.0/24, vlan 20 is on 192.168.3.0/24, and vlan 30 is on 192.168.4.0/24 and so forth. 
    So under DHCP create the DHCP scope.
    interface: vlan 10
    Range start: 192.168.2.100
    range end: 192.168.2.254
    DNS server 1:  192.168.2.1     (I am using the UTM for DNS)
    DNS server 2 : left blank
    Default gateway: 192.168.2.1
    Domain: left blank
    Lease time: 68400

    (note, default gateway for each vlan is the I.P. for the Vlan interface, example vlan 20 gateway is  192.168.3.1 and vlan 30 gateway is 192.168.4.1

    4. Click on NAT secition under network Protection.
    Creat the Masquerading rule or rules for each vlan.
    As provided in the post, thank you Balfson,this example could be used:
    "You also could do '{192.168.0.0/21} -> External' in a single masq rule. The firewall rule should look like 'Allow : {192.168.0.0/21} -> Any -> Internet'."
    I made rules for each Vlan, encase I wanted to make some non routed out I could disable them.  
    so for my masquerading rule:
    network: (green icon)vlan 10 (network)
    interface: media comm   (this is your WAN interface, my eth1 is label as media comm   which is my isp.)
    use address: >
    comment: vlan 10

    The settings are basically the same, just do it for each vlan needed or use the single rule provided by Balfson.

    5. set the firewall rule.
    I assume you can make one rule that lists all the vlans in it or make individual rules for each vlan. I made one for each vlan.

    Group: I left alone
    Position: happens to be 2
    Sources:blue icon for vlan 10
    ( I assume in this box you can all all the vlan interfaces to allow out to the Internet)
    Services: any
    Destination: any
    action: allow
    Comment: vlan 10
    time period: always
    Log traffic is checked


    I hope this helps for future people setting up the vlan mode.
    Again I read and as noted in the fourms for UTM, Vlan 0 and vlan 1 can not be used on your network, UTM uses them. I usually need a full complete example to follow when configuring for the first time, so if I have a full example of a working model to follow i can usually figure out what to change in each step and figure out how to set it up on my UTM.  
    IF I understand correctly, in UTM, if you have several outside Internet I.P. addresses to use on your WAN interface, you would use a SNAT for each Vlan, and SNAT rules to be used for their our WAN I.P. I have just one WAN I.P. to use, so I need to Masquerade all VLAN I.P. scopes out / over my one WAN address.
  • Thanks for your contribution!

    In fact, you could have a different masquerading rule for each VLAN, each using a different Additional Address.   

    Cheers - Bob  

    Sorry for any short responses.  Posted from my iPhone.
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • @cmp92000

    Who is taking care of the routing task in your network? The sophos router, or the Cisco switch (if Layer 3 mode is enabled)?