If add multiple IP addresses to an interface , which ip address will be used when connect remote device with “telnet”? Is there any rules?
Thanks!
It doesn’t matter which ip address you use . If necessary, allow the required port on input chain with accept action !
P.S. And use SSH instead telnet !
I must to connect remote device with assigned ip which in white list.
It wasn’t clear from your question whether you were concerned about connecting to a remote device from the local one with multiple IPs on the same interface or from a remote device to the local one.
Since you are interested in the former, the best approach is to take no chances and control it: add a dedicated route with dst-address set to the address of the remote device, the correct gateway, and with pref-src set to the local IP address which is whitelisted on the remote device.
Thanks for your answer.
Connecting to a remote device from the local one with multiple IPs on the same interface is the question I concerned.
Maybe,it use address orderly in number of ip address. when I changed the number of the addess,the addess connect to remote device from the local was changed.
Your way is quite right !