ssh behind a firewall

Pavlos Parissis p_pavlos@freemail.gr
Wed, 27 Nov 2002 19:51:37 +0200


Hello all,
I have a firewall running iptables and connected to the internet with ISDN
and
it has static ip.
Behind the firewall i have a samba server which also has ssh server.
I want people from internet to connect with ssh and use the sftp-server in
order
to put/get files to that server.
So i said i will use these rules

$IPT -t nat -A PREROUTING -i $EXT_IFACE -p tcp -s ! $LAN_IP_RANGE --dport
2222 -j DNAT --to-destination $SSH_SERVER
$IPT -A internet-lan -p tcp -d $SSH_SERVER --dport 2222 -m state --state
NEW,ESTABLISHED -j ACCEPT
$IPT -A lan-internet -p tcp -s $SSH_SERVER --sport 2222 -m state --state
ESTABLISHED -j ACCEPT

I did n't try it so i would like to know
if is it possible this scenario to work?

Yours,
PAvlos


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I love having the feeling of being in control
while i have the sensation of speed

The surfer of life
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~