This question already has an answer here:

ifconfig -a:

eth1: <irrelevant...>

On the same machine:

nmap -p 9866 localhost

Will show that state is open and detects what service that is running


nmap -p 9866

Will show that state is closed, but still detects what service is running

Can i route traffic incoming from eth0 to I tried with several iptables rules i found from a search on this issue, but it didn't work out.

marked as duplicate by cas, Rui F Ribeiro, Jeff Schaller, jimmij, mdpc Jan 11 '18 at 0:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 is not localhost. localhost ( is a completely different and unrelated IP address, on a completely different network interface (lo rather than eth0).

If you want a process to listen on multiple IP addresses, you need to tell it to listen on a list of specific IP addresses, or tell it to listen on ALL IP addresses.

If your server process can only listen on one IP address at a time, you can run multiple instances of it - each one listening on a different IP address.

BTW, you need to post exact details (edit your question and add the details) of what you tried with iptables. it is certainly possible to redirect from to but without seeing what you tried, it's impossible to tell why it didn't work.

Not the answer you're looking for? Browse other questions tagged or ask your own question.