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

    How to enable / disable interfaces from command line?

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 2 Posters 12.3k 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.
    • dimskraftD
      dimskraft
      last edited by

      I am using several providers and suspect some of them are blocking some IP addresses. So, I would like to write automated script (on another machine), which will enter into pfSense box by ssh and then disble interfaces by one and check availability of these IP addresses.

      For this I need to be able to enable / disable WAN interfaces from command line.

      How to do this?

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

        You can just ifconfig real_interface down from the command line temporarily but there are probably better ways to do this.

        What are you actually testing with the script? Just trying to reach a remote site via each WAN?

        Steve

        1 Reply Last reply Reply Quote 0
        • dimskraftD
          dimskraft
          last edited by

          @stephenw10 yes, I am trying to check if some hosts are available vie one WAN or another.

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

            Then can you not just ping them from each interface in a script? Just use the bind switch to select the source IP.

            Steve

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