Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] iptables: port forwarding



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

Cheers,
 David
-- 
 David Santinoli, Milano             +   <david@example.com>
 Independent Linux/Unix consultant   +   http://www.santinoli.com


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links