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

    WAN only connects on unplug and plug back in

    Scheduled Pinned Locked Moved General pfSense Questions
    59 Posts 4 Posters 3.1k 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.
    • randombitsR
      randombits @Gertjan
      last edited by

      @Gertjan I know, I'm scared of IPv6 ...😰

      1 Reply Last reply Reply Quote 0
      • randombitsR
        randombits @stephenw10
        last edited by randombits

        @stephenw10 No, vtnet1 doesn't appear to after I toggle the WAN. Scrub that I see my IP listed further down with the lo0 interface

        After reboot

        AFTER REBOOT-pfsense-diag-routes-php-2024-08-19-16_43_50.png

        And after toggle

        AFTER TOGGLE-pfsense-diag-routes-php-2024-08-19-16_45_47.png

        And the Gateway tab

        screencapture-pfsense-system-gateways-edit-php-2024-08-19-17_01_10.png

        1 Reply Last reply Reply Quote 0
        • randombitsR
          randombits @stephenw10
          last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Hmm, OK well no default gateway is what's causing the problem. To confirm that try resaving the gateways page rather then reconnecting the WAN and make sure that also fixes it.

            But what is causing that missing gateway... Any errors in the gateway or routing log after reboot?

            randombitsR 1 Reply Last reply Reply Quote 0
            • randombitsR
              randombits @stephenw10
              last edited by randombits

              @stephenw10 Nothing in the routing log and repeated below in the gateway log

              Aug 19 17:42:31 dpinger 64161 WAN_DHCP XXX.XXX.XXX.XXX: sendto error: 65

              until I toggle the WAN.

              (I wonder if anything in Proxmox is the issue ? I can't see why. Although I do split the LAN/WAN in the switch as the VM only has one ethernet port, this has never been an issue before)

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

                I would first try disabling some of those packages as a test. You seem to have a bunch of references to old interfaces that are no longer present. And it's also trying to load vmware tools in Proxmox.

                This looks to be the issue but it's not clear what the cause is:

                Aug 19 14:27:15	php_wg	59854	/usr/local/pkg/wireguard/includes/wg_service.inc: The command '/sbin/route -n6 get 'default' 2>/dev/null | /usr/bin/egrep 'flags: <.*PROTO.*>'' returned exit code '1', the output was ''
                Aug 19 14:27:15	php_wg	59854	/usr/local/pkg/wireguard/includes/wg_service.inc: Default gateway setting Interface WAN_DHCP Gateway as default.
                

                I'd guess it's a timing issue due to one of those previous errors. Disabling some packages to prevent that may allow it to comes up with a default route and if so we can dig into that.

                randombitsR 1 Reply Last reply Reply Quote 0
                • randombitsR
                  randombits @stephenw10
                  last edited by randombits

                  @stephenw10 Morning, I've removed Vmtools and removed Wireguard that made no difference. Where do I remove the those orphaned interfaces em0, pppoe, em0.xx etc ?

                  I've just noticed watching the boot screen I see

                  Configuring WAN interface...[fib_algo] Inet.0 (bsearch4#28) rebuild_fb_flm: switching algo to radix4_lockless
                  
                  1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator
                    last edited by

                    That message at boot is fine, not an issue.

                    The old interfaces look to be in vmstat.

                    randombitsR 1 Reply Last reply Reply Quote 0
                    • randombitsR
                      randombits @stephenw10
                      last edited by

                      @stephenw10 What I meant was where are they located in the cli (putty) so I remove them if that's the right thing to do. I did use pppoe with my old ADSL ISP, I just swapped from pppoe over to DHCP for the WAN

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

                        They are in the config file (/conf/config.xml) but you should be able to remove them in the gui by re-configuring vmstat.

                        randombitsR 1 Reply Last reply Reply Quote 0
                        • randombitsR
                          randombits @stephenw10
                          last edited by

                          @stephenw10 I was the right place I assumed, but a bit daunted pruning the xml. What do you mean by re-configuring the xmstat ?

                          The interfaces look like this 2024-08-20 15_07_33-pfSense.localdomain - Interfaces_ Interface Assignments.png

                          Does pfSense assume the WAN is vtnet0 or vtnet1 ? I vaguely remember em0 and em1 would get mixed up

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

                            @randombits said in WAN only connects on unplug and plug back in:

                            Does pfSense assume the WAN is vtnet0 or vtnet1 ?

                            It has no preset config for vtnet, the user has to assign those interfaces manually.

                            If you have em NICs it will initially use em0 as WAN unless you set it differently.

                            vmstat is used by a package you have installed so probably darkstat or Banwidthd. If you resave the config in that package it should remove those old NIC references.

                            randombitsR 1 Reply Last reply Reply Quote 0
                            • randombitsR
                              randombits @stephenw10
                              last edited by randombits

                              @stephenw10 I removed both darkstat & bandwidthd and reinstalled them but the orphaned interfaces are still in the log.

                              I just looked in config.xml and there's no reference to emX.XXX etc only vtnet's

                              Just spotted this, but not sure how relevant it is

                              Aug 20 18:28:30	php-cgi	453	rc.bootup: Default gateway setting Interface WAN_DHCP Gateway as default.
                              Aug 20 18:28:30	php-cgi	453	rc.bootup: The command '/sbin/route -n6 get 'default' 2>/dev/null | /usr/bin/egrep 'flags: <.*PROTO.*>'' returned exit code '1', the output was ''
                              Aug 20 18:28:31	kernel		done.
                              Aug 20 18:28:34	php-cgi	453	rc.bootup: sync unbound done.
                              Aug 20 18:28:35	kernel		done.
                              

                              One thing, many thanks for bearing with me - I do very much appreciate it ! 👏

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

                                Yes, that's what I pointed out above. It may or may not be the issue but it's certainly suspicious.

                                What interface references are you seeing now?

                                What packages do you still have installed?

                                randombitsR 1 Reply Last reply Reply Quote 0
                                • randombitsR
                                  randombits @stephenw10
                                  last edited by

                                  @stephenw10 Packages
                                  screencapture-pfsense-pkg-mgr-installed-php-2024-08-20-19_02_59.png

                                  And these still hanging around

                                  Aug 20 18:29:28	vnstatd	41582	vnStat daemon 2.11 (pid:41582 uid:0 gid:0, SQLite 3.43.1)
                                  Aug 20 18:29:28	vnstatd	41582	Data retention: 48 5MinuteHours, 4 HourlyDays, 62 DailyDays, 25 MonthlyMonths, -1 YearlyYears, 20 TopDayEntries
                                  Aug 20 18:29:28	vnstatd	41582	Monitoring (22): vtnet1 (10000 Mbit) vtnet0.999 (10000 Mbit) vtnet0.40 (10000 Mbit) vtnet0.30 (10000 Mbit) vtnet0.20 (10000 Mbit) vtnet0.10 (10000 Mbit) vtnet0 (10000 Mbit) tun_wg1 (1000 Mbit) tun_wg0 (1000 Mbit) pppoe0 (1000 Mbit) pfsync0 (1000 Mbit) pflog0 (1000 Mbit) ovpns1 (1000 Mbit) ovpnc2 (1000 Mbit) enc0 (1000 Mbit) em1 (1000 Mbit) em0.999 (1000 Mbit) em0.40 (1000 Mbit) em0.30 (1000 Mbit) em0.20 (1000 Mbit) em0.10 (1000 Mbit) em0 (1000 Mbit)
                                  Aug 20 18:29:28	vnstatd	45241	Error: pidfile "/var/run/vnstat/vnstat.pid" lock failed (Resource temporarily unavailable), exiting.
                                  Aug 20 18:29:28	vnstatd	41582	Interface "tun_wg1" disabled.
                                  Aug 20 18:29:28	vnstatd	41582	Interface "tun_wg0" disabled.
                                  Aug 20 18:29:28	vnstatd	41582	Interface "pppoe0" disabled.
                                  Aug 20 18:29:28	vnstatd	41582	Interface "em1" disabled.
                                  Aug 20 18:29:28	vnstatd	41582	Interface "em0.999" disabled.
                                  Aug 20 18:29:28	vnstatd	41582	Interface "em0.40" disabled.
                                  Aug 20 18:29:28	vnstatd	41582	Interface "em0.30" disabled.
                                  Aug 20 18:29:28	vnstatd	41582	Interface "em0.20" disabled.
                                  Aug 20 18:29:28	vnstatd	41582	Interface "em0.10" disabled.
                                  Aug 20 18:29:28	vnstatd	41582	Interface "em0" disabled.
                                  Aug 20 18:29:28	tail_pfb	46393	[pfBlockerNG] Firewall Filter Service stopped
                                  Aug 20 18:29:29	php_pfb	47122	[pfBlockerNG] filterlog daemon stopped
                                  Aug 20 18:29:29	tail_pfb	53027	[pfBlockerNG] Firewall Filter Service started
                                  Aug 20 18:29:29	root	53976	Bootup complete
                                  
                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    Do you still see those is Bandwidthd and darkstat are disabled?

                                    randombitsR 1 Reply Last reply Reply Quote 0
                                    • randombitsR
                                      randombits @stephenw10
                                      last edited by

                                      @stephenw10 yes, I removed both packages and not reinstalled and the interface references are still there after a reboot

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

                                        Hmm, and still from vnstatd?

                                        I'd backup the config and search it directly for em references.

                                        randombitsR 1 Reply Last reply Reply Quote 0
                                        • randombitsR
                                          randombits @stephenw10
                                          last edited by randombits

                                          @stephenw10 yes vmstatd, bit difficult on a phone atm, I'll save and look at the config.

                                          1 Reply Last reply Reply Quote 1
                                          • randombitsR
                                            randombits
                                            last edited by randombits

                                            Right then, No reference to em interfaces at all only vtnet ones.

                                            Ah-ha ! I removed Traffic totals and rebooted and the vnstatd interfaces references have gone.

                                            Although the rebooting WAN issues remains

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