Navigation

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

    Set gateway and DNS in shell

    General pfSense Questions
    3
    3
    30218
    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
      SyRenity last edited by

      Hi.

      I'm connected to pfSense over another machine, and trying to define gateway on WAN, so I could get to management interface.

      There is no such option in pfSense shell settings, any idea how to sent the gateway and DNS?

      Thanks.

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

        Permanently? Not so easy. Temporarily, easy.

        echo "nameserver x.x.x.x" > /etc/resolv.conf
        route add default y.y.y.y
        

        Where x.x.x.x is your DNS and y.y.y.y is your gateway.

        Once you're in the GUI, fix up the settings properly and you're good.

        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
        • D
          dmad last edited by

          @jimp:

          Permanently? Not so easy. Temporarily, easy.

          echo "nameserver x.x.x.x" > /etc/resolv.conf
          route add default y.y.y.y
          

          Where x.x.x.x is your DNS and y.y.y.y is your gateway.

          Once you're in the GUI, fix up the settings properly and you're good.

          Perfect this is exactly what I needed..

          nothing like trying to configure using GUI via super delayed remote console link ugh

          1 Reply Last reply Reply Quote 0
          • First post
            Last post