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

    How can I set the WAN IP without HTTP access?

    Problems Installing or Upgrading pfSense Software
    3
    8
    8.1k
    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.
    • S
      superwormy
      last edited by

      I have a new pfSense installation at a dedicated server facility, and I'm connected to it via KVM-over-IP. I need to assign it a static WAN IP address.

      I don't have access to the web GUI, because I can't get the other two machines behind this set up until I can allow access through pfSense.

      How can I set the WAN IP address from the command line?

      1 Reply Last reply Reply Quote 0
      • S
        superwormy
        last edited by

        P.S.: This is pfSense 1.2.3 RELEASE.

        pfSense is the main box with a static IP. M1 and M2 are behind the firewall, but inaccessible until I get pfSense set up.

        pfSense
            |
        –----
        M1    M2

        1 Reply Last reply Reply Quote 0
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          From the console, run "pfctl -d", then the filter will be disabled, and you can access the GUI. You might need to run it again after saving some changes which might kick it back on.

          Once you have switched to ssh and have a firewall rule in place letting you in, then run "pfctl -e" to make sure it goes back on.

          Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

          Need help fast? Netgate Global Support!

          Do not Chat/PM for help!

          1 Reply Last reply Reply Quote 0
          • S
            superwormy
            last edited by

            OK, thanks, that gets me partially there.

            I can then use option 8 and set the WAN IP address manually with ifconfig. However, it seems like after about 30 seconds pfSense resets the WAN IP address back to 0.0.0.0 or DHCP or something, and I lose the connection.

            Why is that happening? How do I stop it from happening?

            1 Reply Last reply Reply Quote 0
            • S
              superwormy
              last edited by

              The easiest way to do this seems to be to just edit /conf/config.xml manually.

              vi /conf/config.xml

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                You can probably just kill dhclient and then set by hand, rather than hand-editing the config, but that works too (but is more prone to error)

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

                1 Reply Last reply Reply Quote 0
                • E
                  Efonnes
                  last edited by

                  I think the enableallowallwan script was available on 1.2.3.  If you are wanting to temporarily allow all through WAN, go to the PHP shell/developer shell and type:

                  playback enableallowallwan

                  This will allow everything through until you change it in the web gui.  Isn't there an option on the console menu to set the WAN IP address?  When using a static IP, I think it lets you set the gateway, too.

                  1 Reply Last reply Reply Quote 0
                  • jimpJ
                    jimp Rebel Alliance Developer Netgate
                    last edited by

                    The console option to set the WAN IP is only on 2.0, but it's there now. May as well do pfctl -d/pfctl -e rather than involving the PHP shell, a lot less hoops to jump though for the same effect :-)

                    Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                    Need help fast? Netgate Global Support!

                    Do not Chat/PM for help!

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