OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • [SOLVED] Ping from interface with command line
« previous next »
  • Print
Pages: [1]

Author Topic: [SOLVED] Ping from interface with command line  (Read 19380 times)

vupibi

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
[SOLVED] Ping from interface with command line
« 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?
« Last Edit: June 04, 2016, 03:24:35 pm by franco »
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17701
  • Karma: 1615
    • View Profile
Re: Ping from interface with command line
« Reply #1 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.
Logged

vupibi

  • Newbie
  • *
  • Posts: 9
  • Karma: 0
    • View Profile
Re: Ping from interface with command line
« Reply #2 on: June 01, 2016, 10:40:31 pm »
Oh, this works very well, thank you!
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17701
  • Karma: 1615
    • View Profile
Re: [SOLVED] Ping from interface with command line
« Reply #3 on: June 04, 2016, 03:24:46 pm »
you're welcome :)
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • [SOLVED] Ping from interface with command line
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2