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

Set gateway and DNS in shell

Scheduled Pinned Locked Moved General pfSense Questions
3 Posts 3 Posters 36.0k 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.
  • S
    SyRenity
    last edited by Oct 23, 2011, 1:37 PM

    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
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Oct 24, 2011, 5:38 PM

      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 Dec 19, 2011, 8:57 PM

        @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
        • E elvisimprsntr referenced this topic on Jul 24, 2024, 7:28 AM
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received