-   Linux - Networking (
-   -   ssh to firewall then to computer (

jonfa 01-19-2007 04:12 PM

ssh to firewall then to computer
Hi All,

I have set up a firewall with Centos and I have other Centos boxes behind it. I want to ssh to the machines behind the firewall, but I don't really understand the syntax to do so. I can ssh to the firewall box with no problem. Any ideas?


Tux-Slack 01-19-2007 04:40 PM

then ssh next to the machine behind it
use the local ip address of it
i.e. ssh

capn_hector 01-19-2007 05:22 PM


Originally Posted by Tux-Slack
then ssh next to the machine behind it
use the local ip address of it
i.e. ssh

a little clarification, ssh into your router (ssh root@router-public-ip) and then in your ssh session since your connected into your router controlling it, ssh to your other machines (ssh root@local-machine-ip)

this does work, i set up openwrt and did this alot. its just opening up port 22 in your firewall so your router accepts connections from the world.

unSpawn 01-19-2007 06:14 PM

For easier accessing machines behind a fw check out the excellent "Breaking Firewalls with OpenSSH and PuTTY".

Tux-Slack 01-20-2007 12:58 AM

or you could do it like this
firewall ssh port 22 open, rule ACCEPT in iptables
and for your local machine behind the firewall ssh port 23 i.e.
and in the firewall of your router forward the port 23 to the local machine
so when you ssh to your machine behind your router-firewall you would just connect to port 23 and you would get direct access to the machine behind the firewall

All times are GMT -5. The time now is 06:32 PM.