SSH through Firewall

Oct 07, 2005 5 Replies

Newbee Question, I have the following firewall config



Eth0 (external IP)----Firewall----Internal Network LAN(internal IPs)



We have started firewall and blocked ssh initially. Now we need to open ssh port in the firewall. From within the Internal I can SSH firewall and be able login but even after opening the port 22 and starting sshd service at Firewall I am unable to get into the system from the outside Internet. Any pointers shall be welcome. Many thanks Karmath


In article , wrote: :I have the following firewall config

:Eth0 (external IP)----Firewall----Internal Network LAN(internal IPs)

:We have started firewall and blocked ssh initially. Now we need to open :ssh port in the firewall. From within the Internal I can SSH firewall :and be able login but even after opening the port 22 and starting sshd :service at Firewall I am unable to get into the system from the outside :Internet.

This question would be rather easier to answer if we knew what model of firewall you were using, the softwar version involved, and if you showed us the parts of the configuration file that are relevant to allowing inward access. At last count, there were exactly

17439 different ways of configuring firewalls to do what you want to do, and I don't think I have time today to list more than the first 38 of them.

What software are you using in what configuration? RTFM is all I can offer for now. ;-)

Yours, VB.

ssh xx.yy.zz.aa 255.255.255.255 outside ssh 0.0.0.0 0.0.0.0 outside ssh 192.168.1.0 255.255.255.0 inside ssh timeout 5

xx.yy.zz.aa (external IP)

192.168.1.0 (your internal network)

do not forget add some user and set password

Robert

We are using IPTABLES firewall on Redhat Linux.

-karmath

^^^^^^^^ ^^^^^^^^^^^^ iptables is iptables and the rules are loaded by some form of shell script no matter whether the Linux distribution is RedHat, SuSE, Debian or whatever else. There might be some minor differences depending on the (kernel) version but in general you might find reading the documentation of iptables (and writing of shell scripts)quite useful.

formatting link
Wolfgang

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required