9:16 PMWhich 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".
|Total comments: 0|