Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to get pfSense WAN to accept VLAN 0

    Scheduled Pinned Locked Moved General pfSense Questions
    414 Posts 25 Posters 207.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • N
      natbart @Cool_Corona
      last edited by

      @cool_corona said in How to get pfSense WAN to accept VLAN 0:

      @jknott

      Consider running pfsense in a VM and tag WAN as VLAN0 on the vswitch.

      Then it should be working of the box directly from the modem

      Not sure what the overhead of VMware will do to the performance on my unit. I have a i5-4570TE with 4gb of ram. I would like to run Snort and still get my 1gb symmetrical

      1 Reply Last reply Reply Quote 0
      • N
        natbart @stephenw10
        last edited by

        @stephenw10 - Started digging into Netgraph again.... I found in another post that in 2.4.5-RELEASE-p1 (amd64) Netgraph is now an in-kernel module.

        I am trying to understand the differences of in-kernel modules vs loaded modules and directory structure of where I need to put the script (if any)?

        Waiting for weekend to take system down. I think I have the script cleaned up to only change VLAN tagging

        pfatt2.txt

        1 Reply Last reply Reply Quote 1
        • N
          natbart
          last edited by natbart

          So... after some troubleshooting (Windows messed up the file so it was not found) and one final error in the script (forgot to assign MAC address) I got it working!!!!

          Script loads using Shellcmd (earlyshellcmd) and now I have no need for a switch to front end my connection.

          Thanks to everyone for your feedback and help.

          Problem solved and on to the next project.

          1 Reply Last reply Reply Quote 1
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Yeah the modules are all in kernel you should not need to load anything.

            @natbart said in How to get pfSense WAN to accept VLAN 0:

            I got it working!!!!

            Nice! Can we see it for reference?

            Steve

            N 1 Reply Last reply Reply Quote 0
            • N
              natbart @stephenw10
              last edited by

              @stephenw10 of course... Here is the result. I think I removed everything that was not needed.vlanzero.sh.tar.gz

              N 1 Reply Last reply Reply Quote 1
              • N
                natbart @natbart
                last edited by

                @natbart Attached the graphviz. Maybe there us some optimizations still left. Feel like maybe the o2m portion is not required?a03e55de-7fb7-417c-b896-f514f45d7e65-image.png

                N 1 Reply Last reply Reply Quote 0
                • N
                  natbart @natbart
                  last edited by

                  @natbart Any suggestion on getting to this endstate?4d4362b4-0925-4315-a7ca-0338f9b2a28c-image.png or 3ac82293-7ad5-478f-834c-4ea216bd263f-image.png

                  N 1 Reply Last reply Reply Quote 0
                  • N
                    natbart @natbart
                    last edited by natbart

                    @natbart I think this is the final version...@stephenw10 - thoughts? vlanzero.sh.tar.gz

                    e15132ea-3897-438d-a0cf-51780be97397-image.png

                    J R 2 Replies Last reply Reply Quote 3
                    • J
                      JustASK 0 @natbart
                      last edited by

                      @natbart Thank you for sharing this. This worked like a charm for me and my brand new Fibe service installed earlier this week. I was able to remove the HH3000 device and use my existing pfSense setup without a problem. Great work!

                      N 1 Reply Last reply Reply Quote 0
                      • N
                        natbart @JustASK 0
                        last edited by natbart

                        @justask-0 glad it worked for you! The post had no action till now, so I didn’t know if it was helping anyone else.

                        1 Reply Last reply Reply Quote 0
                        • stephenw10S
                          stephenw10 Netgate Administrator
                          last edited by

                          Yeah, nice work.
                          Did you have to set the priority tag in the end?

                          Steve

                          J 1 Reply Last reply Reply Quote 0
                          • J
                            JustASK 0 @stephenw10
                            last edited by

                            @stephenw10 Yes. This is handled by ngctl within the provided script and applied to the virtual interface. The only thing I added to my setup was the Shellcmd package in order to run the script at startup.

                            M 1 Reply Last reply Reply Quote 2
                            • M
                              mikela @JustASK 0
                              last edited by

                              @justask-0 This is amazing, would you mind giving me a few directions so I can get this to work on my pfsense box using Frontier fiber? Thanks

                              1 Reply Last reply Reply Quote 0
                              • stephenw10S
                                stephenw10 Netgate Administrator
                                last edited by

                                Download that script above and put on the firewall, I would put it in /root. Make sure the file permissions allow it to be run as an executable. Create a shellcmd to run it at boot. Using the shellcmd package is the easiest way to do that.
                                https://docs.netgate.com/pfsense/en/latest/development/boot-commands.html

                                Steve

                                M 1 Reply Last reply Reply Quote 1
                                • M
                                  mikela @stephenw10
                                  last edited by

                                  Thank you sooo much! Do I need to edit the script at all for my environment? I'm just using a netgate device directly connected to my ONT. Nothing special.
                                  Mike

                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    Yes, there are variables at the top of the script:

                                    ONT_IF='xx0'
                                    ONT_ETHER_ADDR='xx:xx:xx:xx:xx:xx'
                                    

                                    You need to set those to match you chosen NIC in pfSense and the MAC of your router.

                                    Steve

                                    M 1 Reply Last reply Reply Quote 0
                                    • M
                                      mikela @stephenw10
                                      last edited by

                                      You da man!

                                      I was reading the "Executing Commands at Boot" doc from the netgate link you sent me. It seems easier to stick the vlanzero script in /usr/local/etc/rc.d/ mark it as executable and call it a day.
                                      Would that work? I cant wait to go home and try this script!!

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        Yes, that would work. I would still use a shellcmd though. You can easily change that from the GUI. It gets stored in the config (though not the script itself). You can set is as an earlyshellcmd to make it run earlier in the boot process.

                                        Steve

                                        M 1 Reply Last reply Reply Quote 0
                                        • M
                                          mikela @stephenw10
                                          last edited by

                                          If you don't use the earlyshellcmd does it run before the WAN interface (since that's what I'll be using) tries to obtain an IP from DHCP upon bootup?

                                          N 1 Reply Last reply Reply Quote 0
                                          • stephenw10S
                                            stephenw10 Netgate Administrator
                                            last edited by

                                            I don't know since I don't use that script personally. There is no danger of it trying directly though since WAN will be assigned as ngeth0 and that doesn't exist until the script runs.
                                            More likely it would fail to boot because it doesn't exist.

                                            Steve

                                            M 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.