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 00:54:56 +0900 (JST)
- From: Susumu ISHIZUKA <sufiyanjp@example.com>
- Subject: Re: [tlug] iptables: port forwarding
--- Nguyen Vu Hung <vuhung@example.com> wrote: > So I wanted to forward packet from 130.153.xxx.yyy( > client side), tcp > protocol, port 80 to where ssh-server listen. On the > server side, I did: > > bash-2.05# /sbin/iptables -t nat -A PREROUTING -i > eth0 -p tcp --dport > 80 -s 130.153.xxx.yyy -j REDIRECT --to-ports 22 > > and from client, I tried to connect: > > $ssh -p 80 vuhung@example.com > > but I got a connection timeout error :( 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 --------- Susumu ISHIZUKA <sufiyanjp@example.com> __________________________________________________ Do You Yahoo!? Yahoo! BB is Broadband by Yahoo! http://bb.yahoo.co.jp/
- Follow-Ups:
- Re: [tlug] iptables: port forwarding
- From: David Santinoli
- Re: [tlug] iptables: port forwarding
- From: Nguyen Vu Hung
- References:
- [tlug] iptables: port forwarding
- From: Nguyen Vu Hung
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Locale not supported (Gentoo and kinput update)
- Next by Date: Re: [tlug] Locale not supported (Gentoo and kinput update)
- Previous by thread: [tlug] iptables: port forwarding
- Next by thread: Re: [tlug] iptables: port forwarding
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links