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

    Automatic gateway not updating after default deleted

    Scheduled Pinned Locked Moved Routing and Multi WAN
    1 Posts 1 Posters 378 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.
    • V
      virtual-frog
      last edited by

      At System/Routing/Gateways in the web UI, I created a new gateway and set it to be the default gateway. It was not working so I deleted it and returned the "Default gateway IPv4" field to the "Automatic" setting. After hours of frustration I realized this "Automatic" setting had not switched back to the original gateway (received via DHCP). The original gateway was online according to the Status/Gateways page, but was not the default and thus no default route was defined. Manually resetting the default ipv4 gateway solved the problem.

      I am on pfSense 2.6.0-RELEASE. I do have ipv6 enabled so there are two gateways on Status/Gateways, one for ipv4 and one for v6 (there should be a default gateway for each).

      I found this somewhat similar issue, but mine seems to be more related to config saving/parsing. While attempting to replicate the issue with the ipv6 gateway I found that even worse, I could not change the default gateway back manually. All my configuration is done in the web UI but I will show how the config file gets messed up.

      Default configuration:

      <gateways>
              <defaultgw4>WANGW</defaultgw4>
              <defaultgw6>WANGWv6</defaultgw6>
      </gateways>
      

      Added a new default gateway and disabled the original:

      <gateways>
              <defaultgw4></defaultgw4>
              <defaultgw6></defaultgw6>
              <gateway_item>
                      <interface>wan</interface>
                      <gateway>dynamic</gateway>
                      <name>WAN_DHCP6</name>
                      <weight>1</weight>
                      <ipprotocol>inet6</ipprotocol>
                      <descr><![CDATA[Interface WAN_DHCP6Gateway]]></descr>
                      <disabled></disabled>
              </gateway_item>
              <gateway_item>
                      <interface>wan</interface>
                      <gateway>**garbage ipv6**</gateway>
                      <name>test6</name>
                      <weight>1</weight>
                      <ipprotocol>inet6</ipprotocol>
                      <descr></descr>
              </gateway_item>
      </gateways>
      

      Removed the new gateway and manually restored the default gateway:

      <gateways>
              <defaultgw4></defaultgw4>
              <defaultgw6></defaultgw6>
              <gateway_item>
                      <interface>wan</interface>
                      <gateway>dynamic</gateway>
                      <name>WAN_DHCP6</name>
                      <weight>1</weight>
                      <ipprotocol>inet6</ipprotocol>
                      <descr><![CDATA[Interface WAN_DHCP6 Gateway]]></descr>
              </gateway_item>
      </gateways>
      

      But now the web UI does not show wan_dhcp6 as a default gateway!

      I am not very experienced with pfsense so I am posting here to make sure it is not a known issue. If this is new I will file a bug report.

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