how to Port Forward

Mike McGrath mmcgrath at iesabroad.org
Thu Jun 9 14:13:38 UTC 2005


 

> -----Original Message-----
> From: fedora-list-bounces at redhat.com 
> [mailto:fedora-list-bounces at redhat.com] On Behalf Of Shahzad Chohan
> Sent: Thursday, June 09, 2005 9:00 AM
> To: Alexander Dalloz
> Cc: For users of Fedora Core releases
> Subject: Re: how to Port Forward
> 
> I'll also like to add to my previous mail.
> 
> The only reason I'm not going to use NAT is becuase I believe 
> that you can't use NAT to port forward on the same subnet, 
> i.e port forward a host with ip 192.168.1.1 22 to 192.168.1.2 22.
> 
> If I am wrong then can someone please show me how to do it with NAT.
> 
> Thanks
> Shaz 
> 
> On 6/9/05, Alexander Dalloz <ad+lists at uni-x.org> wrote:
> > Am Do, den 09.06.2005 schrieb Shahzad Chohan um 13:41:
> > 
> > > I'd like to port forward the ssh port from one internal 
> machine to 
> > > another, is there a way to do this with iptables without 
> using NAT?
> > 
> > > Shaz
> > 
> > You may look for SSH's own possibility too port forward. google for 
> > "ssh port forward" and you get many hints.
> > 
> > Alexander
> > 
> > 
> > --
> > Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 
> 0xB366A773 
> > legal statement: http://www.uni-x.org/legal.html Fedora Core 2 
> > GNU/Linux on Athlon with kernel 2.6.11-1.27_FC2smp Serendipity 
> > 15:39:22 up 16 days, 14:17, load average: 0.04, 0.09, 0.13
> > 
> > 
> > BodyID:41521057.2.n.logpart (stored separately)
> > 
> >
> 
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: http://www.redhat.com/mailman/listinfo/fedora-list
> 
> 


iptables -t nat -A PREROUTING  -p tcp -d 123.123.123.123
--destination-port 22 -j DNAT --to-destination 192.168.1.45

In this case the external IP is 123.123.123.123 and the internal ip
(where the actual ssh server sits) is 192.168.1.45

	-Mike





More information about the users mailing list