I have a scenario: I have 4 server and 3 web inbound requests that I have to allow through a modem/router. the ports are https(ssl)443 ssh22 and http80. All 4 servers want them.
I had set up the server to use port forwarding and remapping like this:
2241->port 22 on ip 192.168.0.41
2242->port 22 on ip 192.168.0.42
2243->port 22 on ip 192.168.0.43
2244->port 22 on ip 192.168.0.44
and so on using 44341(..2..3..4) and 8041(..2..3..4)
I love this set up. Behind the firewall I can use default ports ( I prefer this), from outside I can (as I need to) colon:in.
However two things happened. The modem old router died I bought a new one (expensive) this new tech didn't allow more than 8 ports to be remapped. Bad. Artificial glass ceiling. I then set it up at the customers offices > I went to the customer theirs didn't even have any port forwarding at all, so I bought them a brand new modem router (even more expensive) fearing it would need to do more than 8 ports, and fearing that this kind of port remapping role is now a "premium" feature. I was wrong. The *even*more* expensive new modem router will only allow the ports to be forwarded flatly, it won't allow the ports to be remapped. just forward them on.
SO I digressed massively . But is there a way I can still have port remapping I thought to myself?
can I use something like the following to help me?
iptables -t nat -A PREROUTING -i eth0 -p TCP --dport 2202 -j REDIRECT --to-port 22
is there any reason to avoid this use?