Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] iptables: port forwarding
- Date: Mon, 14 Apr 2003 13:14:02 +0900
- From: Henri Servomaa <henri_servomaa@example.com>
- Subject: Re: [tlug] iptables: port forwarding
- References: <Pine.SUN.3.95.1030413162958.17079B-100000@example.com> <20030413155456.47362.qmail@example.com> <20030413225704.GA20202@example.com>
David Santinoli wrote: > > On Mon, Apr 14, 2003 at 12:54:56AM +0900, Susumu ISHIZUKA wrote: > > > > I think your server replied with source port 22(ssh). > > But it must be masqueraded to 80. > > > > So, try this: > > iptables -t nat -A POSTROUTING -p tcp --sport 22 > > -d 130.153.xxx.yyy > > -j SNAT --to IP.Address.Of.The.Server:80 > > That's unnecessary AFAIK. What's needed, instead, is to accept packets > heading for port 22 in the INPUT chain: > > /sbin/iptables -A INPUT -i eth0 -p tcp --dport 22 -s 130.153.xxx.yyy \ > -j ACCEPT > I think the original poster wanted to ssh to his machine from the outside, using portforwarding on port 80. (because a direct connection was not possible..) In order for the reply to get back to his outside machine, that port needs to be NAT:ted back too. So _both_ the original PREROUTE and POSTROUTE rules are needed in the NAT table. Additionally, if traffic on port 22 was blocked, then the above ACCEPT rule is needed. HTH, -- Henri > Cheers, > David > -- > David Santinoli, Milano + <david@example.com> > Independent Linux/Unix consultant + http://www.santinoli.com > > ********************************************************** > TLUG server is hosted by Open Source Development Lab Japan > http://www.osdl.jp/ > ********************************************************** > > ========================================================== > To unsubscribe from this mailing list, > please see instructions at <http://www.tlug.jp/list.html> > ==========================================================
- References:
- [tlug] iptables: port forwarding
- From: Nguyen Vu Hung
- Re: [tlug] iptables: port forwarding
- From: Susumu ISHIZUKA
- Re: [tlug] iptables: port forwarding
- From: David Santinoli
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Red Hat 9: A warning (Folding@example.com)
- Next by Date: [tlug] Decode MIME shift_jis
- Previous by thread: Re: [tlug] iptables: port forwarding
- Next by thread: Re: [tlug] iptables: port forwarding
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links