[CentOS] Port Forwarding

Fri Jan 16 22:57:16 UTC 2009
nate <centos at linuxpowered.net>

Thom Paine wrote:
> I'm having trouble getting port forwarding working on my one box.

I think port forwarding is working fine, it's the routing of
the traffic back to the source that is not because linux doesn't
handle multiple default gateways very well out of the box. Look
into multi homed routing using iproute2(I think that's the command),
or NAT the traffic going to the inside so routing works. One easy way
to do this is to use a program like rinetd or redir to port forward
the traffic.

Of course the downside to this is all traffic that is forwarded will
appear to your internal host to be originating from your
gateway/firewall.

If it was my setup I wouldn't do either instead I would fire up a
VM that had the other gateway as it's default gateway, keep it
simpler.

nate