• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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.1k 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.
  • D
    dimskraft
    last edited by Aug 6, 2018, 1:22 PM

    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
    • S
      stephenw10 Netgate Administrator
      last edited by Aug 6, 2018, 1:40 PM

      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
      • D
        dimskraft
        last edited by Aug 7, 2018, 4:34 PM

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

        1 Reply Last reply Reply Quote 0
        • S
          stephenw10 Netgate Administrator
          last edited by Aug 7, 2018, 5:08 PM

          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
          1 out of 4
          • First post
            1/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received