Welcome, Guest! Registration

loc2log

Friday, 2024-03-29
Main » 2016 » April » 30

If your Linux box has multiple network interfaces (e.g. eth0, eth1 etc) and you have to deal with firewall rules, you may have to know which exact interface (local IP) is being used to reach that particular remote host.

The answer is:

/sbin/ip route get "target_ip"

Then you may ask, - how do I found out the "target_ip" by the host name? That's easy - use ping "target_host_name" or host "target_host_name".

Views: 721 | Added by: ep | Date: 2016-04-29 | Comments (0)