0

This question already has an answer here:

ifconfig -a:

eth0: 192.168.0.11
eth1: <irrelevant...>
lo: 127.0.0.1

On the same machine:

nmap -p 9866 localhost

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

But:

nmap -p 9866 192.168.0.11

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

Can i route traffic incoming from eth0 192.168.0.11:9866 to 127.0.0.1:9866? 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

192.168.0.11 is not localhost. localhost (127.0.0.1) 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 192.168.0.11:9686 to 127.0.0.1:9866 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.