[SOLVED] Ping from interface with command line

Started by vupibi, May 31, 2016, 11:41:17 PM

Previous topic - Next topic
May 31, 2016, 11:41:17 PM Last Edit: June 04, 2016, 03:24:35 PM by franco
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

ping -I xn2 google.de

but I always receive
ping: invalid multicast interface: `xn2'

for every interface. What am I doing wrong?

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.
"AI has absolutely reduced the cost of creating technical debt." -- ChatGPT


you're welcome :)
"AI has absolutely reduced the cost of creating technical debt." -- ChatGPT