Welcome, Guest! Registration

loc2log

Thursday, 2019-02-21
Main » 2016 » April » 30 » Which local interface is used to access remote address?
9:16 PM
Which local interface is used to access remote address?

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: 410 | Added by: ep | Tags: Networks, Linux | Rating: 0.0/0
Total comments: 0
Only registered users can add comments.
[ Registration | Login ]