How to enable / disable interfaces from command line?
-
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?
-
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
-
@stephenw10 yes, I am trying to check if some hosts are available vie one WAN or another.
-
Then can you not just ping them from each interface in a script? Just use the bind switch to select the source IP.
Steve