Can't SSH from masqued box to gateway
Sat, 27 Oct 2001 19:32:22 +0800
On Fri, Oct 26, 2001 at 10:42:24PM +0200, Rickard Andersson wrote:
> I have a few questions I hope you guys could help me out with. I just
> started playing with iptables and I must admin that my knowledge of
> networking in general is kinda limited.
> 1. I read the "iptables Tutorial 1.1.0" by Oskar Andreasson found at
> l/iptables-tutorial.html and everything seemed to work well until I tried to
> SSH into the "server". I couldn't. I also tried to connect to my IRC-bouncer
To allow ssh to the gateway you need two things:
1. on the gateway, setup the ListenAddress (/etc/ssh/sshd_config)
to your gateway address. The default setting is 0.0.0.0 which allow
everyone in the world to access it. If your gateway address is a
non-routable ip, the ssh server will only listen to them.
2. if your gateway ip is 192.168.0.1
setup /etc/hosts.allow as