What if the correct answer with
route_localnet doesn't work?..
If your kernel doesn't include the patch for
route_localnet, then... upgrade the kernel!
Or there are other ways to forward the traffic coming to one interface to another port on another interface (in particular, to localhost) by running a process that would listen on the external interface and forward the traffic.
ssh (and perhaps more) are all examples of programs able to do this (although choosing
ssh would be strange and ineffective).
I've written a configuration for
xinetd for this. Now this service is automatically brought up:
# cat /etc/xinetd.d/z-from-outside
# default: off
# description: Forward connections to the z port.
disable = no
socket_type = stream
type = UNLISTED
wait = no
user = nobody
bind = vaio.ob
port = 7070
redirect = localhost 7070
vaio.ob is the name of this host on the external network interface.)
service xinetd reload, let's check that it is listening:
# lsof -i -P | fgrep 7070
xinetd 556 root 6u IPv4 1797906 0t0 TCP vaio.ob:7070 (LISTEN)
sshd 27438 tun_zzoom 4u IPv4 1059100 0t0 TCP localhost.localdomain:7070 (LISTEN)
And indeed, connections do go through!