OPNsense Forum

English Forums => General Discussion => Topic started by: panseit on March 01, 2024, 12:28:44 AM

Title: Network/VLAN/Firewall Questions and Setup
Post by: panseit on March 01, 2024, 12:28:44 AM
Greetings everyone,

I want to apologize for the lengthy (first) post but I am trying two weeks now to configure this network with no success. I am new to homelab and networking (only know the basics about how networks work). Read many guides and watched many videos but still nothing :/

The topology I want to implement is this:
https://i.ibb.co/Jt1Hqh0/Topology.png
Hardware
1. ProtectlI VP2420 as my router
2. Grandstream HT801 as my ATA device (VoIP)
3. Omada SG2008 (main switch - PoE)
4. TL-SGP05PE (dedicated PoE switch for my SOONTM Hyper-Converged Ceph Proxmox Cluster
5. Ubiquiti U6-Pro Access Point
6. Omada OC200 Controller (I will replace my U6-Pro for a WiFi 7 TP-link one down the line)

My ISP provides data and VoIP through 835 VLAN and doesn't provide me with the prefix delegation size for IPv6 (I spoke to 4 people and none knew to answer)

I have these WAN settings:
https://i.ibb.co/ygMkXJ3/WAN.png

Issues
Tbh nothing works. My desktop doesn't have access to the Internet, I cannot access the other VLAN devices through their Static IPs and many more  :(

Guides tried:
* https://homenetworkguy.com/how-to/set-up-a-fully-functioning-home-network-using-opnsense
* https://forum.opnsense.org/index.php?topic=21207
* https://homenetworkguy.com/how-to/firewall-rules-cheat-sheet/

Questions

I really cannot thank you enough even for reading thus far. Tbh the most important part to sort out I think are the firewall rules. Except my knowledge on networks :D
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: CJ on March 01, 2024, 12:33:34 AM
I'm not familiar with pppoe so I can't speak to that part, but what I always recommend to people starting out is to keep it simple.  Just get default OPNsense working with WAN and LAN only.  Don't worry about all of the extra functionality or network options.

Once you have a basic setup working to replace your consumer router, then you can slowly expand and experiment with things one piece at a time.  If something breaks, you can easily restore the old config, even if you need to completely reinstall.
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: panseit on March 01, 2024, 12:46:30 AM
Quote from: CJ on March 01, 2024, 12:33:34 AM
I'm not familiar with pppoe so I can't speak to that part, but what I always recommend to people starting out is to keep it simple.  Just get default OPNsense working with WAN and LAN only.  Don't worry about all of the extra functionality or network options.

Once you have a basic setup working to replace your consumer router, then you can slowly expand and experiment with things one piece at a time.  If something breaks, you can easily restore the old config, even if you need to completely reinstall.

I tried and got it working (only lan and wan) when I was tagging the router ports and not using a switch. Also my firewall rules where allow all :P When I tried to bring the switch into the game and incorporate some VLANs hell broke loose.
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: CJ on March 01, 2024, 12:43:32 PM
Quote from: panseit on March 01, 2024, 12:46:30 AM
I tried and got it working (only lan and wan) when I was tagging the router ports and not using a switch. Also my firewall rules where allow all :P When I tried to bring the switch into the game and incorporate some VLANs hell broke loose.

If your firewall rules are allow all, I would say you didn't have it working.  It sounds like you're still trying to do too much at once.

Also, you should be able to use the switch without VLANs to start and then add them slowly as you verify things are working.
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: panseit on March 01, 2024, 12:52:36 PM
Quote from: CJ on March 01, 2024, 12:43:32 PM
Quote from: panseit on March 01, 2024, 12:46:30 AM
I tried and got it working (only lan and wan) when I was tagging the router ports and not using a switch. Also my firewall rules where allow all :P When I tried to bring the switch into the game and incorporate some VLANs hell broke loose.

If your firewall rules are allow all, I would say you didn't have it working.  It sounds like you're still trying to do too much at once.

Also, you should be able to use the switch without VLANs to start and then add them slowly as you verify things are working.
3

Yeah that's my approach atm. Do you know regarding my DNS question?
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: cookiemonster on March 01, 2024, 03:15:44 PM
what's your DNS question?
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: panseit on March 01, 2024, 03:16:59 PM
Quote from: cookiemonster on March 01, 2024, 03:15:44 PM
what's your DNS question?

2. I saw in some guides that I should make rules to allow the port 53 for all the VLANs from VLAN's net to VLAN address. I added values to the Unbound DNS over TLS settings. Should I open the port 853 too?
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: cookiemonster on March 01, 2024, 04:53:48 PM
answer is: it depends.
Like CJ wrote, your initial post is super convoluted. It's now unclear to me what is being setup and therefore what rules might be needed. I thought you were going to be without VLANs to begin with.
If going with VLANs, then the default allow rule will allow the queries from clients to get to Unbound listening on all interfaces. Have you tested it? You don't need to add firewall rules if you enable DoT on Unbound.
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: CJ on March 01, 2024, 05:06:49 PM
I like HNG, but I feel like his guide to setting up OPNsense causes people more problems than it solves.  I suspect he realized this as well since he created a simpler one.  https://homenetworkguy.com/how-to/beginners-guide-to-set-up-home-network-using-opnsense/

This is why I recommend people to do things in stages, via small discrete steps.  This allows them to get familiar with things before moving on to the next piece to learn.
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: panseit on March 01, 2024, 07:22:48 PM
Quote from: CJ on March 01, 2024, 05:06:49 PM
I like HNG, but I feel like his guide to setting up OPNsense causes people more problems than it solves.  I suspect he realized this as well since he created a simpler one.  https://homenetworkguy.com/how-to/beginners-guide-to-set-up-home-network-using-opnsense/

This is why I recommend people to do things in stages, via small discrete steps.  This allows them to get familiar with things before moving on to the next piece to learn.

Now that I read my post again it's super confusing. I spray questions unrelated left and right. I should have posted only my topology image and not go into other not so related things. Tbh the whole post could be boiled down to two questions:
1. Seeing this guide (https://forum.opnsense.org/index.php?topic=21207) I see that he has assigned WAN completely different than mine (assigned it to physical and vlan). Is my assignment correct or wrong?
2. Firewall rule to allow one PC that belongs to VLAN 20 and has static IP (192.168.20.20) to be able to manage LAN devices (switches, router) and the Grandstream that belongs to VLAN 30.

Thank you and sorry for anyone that attempted to read my spaghetti.
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: panseit on March 01, 2024, 07:28:51 PM
Quote from: cookiemonster on March 01, 2024, 04:53:48 PM
answer is: it depends.
Like CJ wrote, your initial post is super convoluted. It's now unclear to me what is being setup and therefore what rules might be needed. I thought you were going to be without VLANs to begin with.
If going with VLANs, then the default allow rule will allow the queries from clients to get to Unbound listening on all interfaces. Have you tested it? You don't need to add firewall rules if you enable DoT on Unbound.

I wanted to quote you but I quoted "cookiemonster"
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: cookiemonster on March 01, 2024, 11:51:42 PM
Quote from: panseit on March 01, 2024, 07:22:48 PM
1. Seeing this guide (https://forum.opnsense.org/index.php?topic=21207) I see that he has assigned WAN completely different than mine (assigned it to physical and vlan). Is my assignment correct or wrong?
2. Firewall rule to allow one PC that belongs to VLAN 20 and has static IP (192.168.20.20) to be able to manage LAN devices (switches, router) and the Grandstream that belongs to VLAN 30.
1. That link is for an ISP that provides different services on different VLAN tags. If yours requires only one tag for all, your good if you get services the way you have set it up.
2. You need a firewall rule on interface VLAN20, direction IN, destination Any.
Title: Re: Network/VLAN/Firewall Questions and Setup
Post by: panseit on March 02, 2024, 01:04:21 AM
Quote from: cookiemonster on March 01, 2024, 11:51:42 PM
Quote from: panseit on March 01, 2024, 07:22:48 PM
1. Seeing this guide (https://forum.opnsense.org/index.php?topic=21207) I see that he has assigned WAN completely different than mine (assigned it to physical and vlan). Is my assignment correct or wrong?
2. Firewall rule to allow one PC that belongs to VLAN 20 and has static IP (192.168.20.20) to be able to manage LAN devices (switches, router) and the Grandstream that belongs to VLAN 30.
1. That link is for an ISP that provides different services on different VLAN tags. If yours requires only one tag for all, your good if you get services the way you have set it up.
2. You need a firewall rule on interface VLAN20, direction IN, destination Any.

Will try that rule, thank you! I will reset OPNsense and start over bit by bit. Since now I cannot access the Internet still even after following the guide you posted and removing any vlan etc. Just connected to a port on the switch.