[CentOS] A little iptables help

Wed Sep 28 16:47:43 UTC 2005
James Pifer <jep at obrien-pifer.com>

On Wed, 2005-09-28 at 08:49 -0700, Kirk Bocek wrote:
> James Pifer wrote:
> > 
> > No, I need to forward several machines through a specific port to a
> > single machine. Not "forward 8000 to several hosts". 
> > 
> 
> James, you don't say if you need to forward one port or all ports to that single 
> machine. There is no way to forward from a single port on the firewall to *all* ports 
> on the target host. You can, however, forward individual ports: say from port 8000 on 
> the firewall to port 80 on the target host.
> 
> I did this successfully providing external SSH access to a collection of hosts on a 
> private network. However for this to work, the hosts on the private net also need to 
> be doing SNAT back out through the firewall.
> 

Just to clarify. Single port. For example:

x.x.x.x:8000 to y.y.y.y:8000
z.z.z.z:8000 to y.y.y.y:8000

Thanks,
James