OPNsense Forum

English Forums => General Discussion => Topic started by: vupibi on May 31, 2016, 11:41:17 pm

Title: [SOLVED] Ping from interface with command line
Post by: vupibi on May 31, 2016, 11:41:17 pm
Hello,

I need to ping a server through different interfaces on an OPNsense system. I could do that with the web interface but I need it in command line.

"ifconfig" gives me the names of my interfaces, in my case it is from xn0 to xn13.

Usually i would use a command like

Code: [Select]
ping -I xn2 google.de
but I always receive
Code: [Select]
ping: invalid multicast interface: `xn2'
for every interface. What am I doing wrong?
Title: Re: Ping from interface with command line
Post by: franco on June 01, 2016, 06:11:38 pm
In FreeBSD ping(1) only supports "-S SRCIP". When you specify the source IP for the interface you want, you will ping from this particular interface owning the SRCIP.
Title: Re: Ping from interface with command line
Post by: vupibi on June 01, 2016, 10:40:31 pm
Oh, this works very well, thank you!
Title: Re: [SOLVED] Ping from interface with command line
Post by: franco on June 04, 2016, 03:24:46 pm
you're welcome :)