Firewalling! How can you stop a ssh tunnel?

Soldato
Joined
22 Dec 2008
Posts
10,369
Location
England
Say you have a computer acting as a gateway to the internet. Someone on the local network has root access to a (his) computer, and to a computer on the other side of the gateway.

You've implemented a cheerfully draconian approach to security. Say a "no porn" or "no pirate bay" stance, in UK Government fashion. Unfortunately for you as the gateway owner, everyone with access to Google has come across VPN and ssh tunnels. How can you restrict traffic despite these?

I'm drawing a blank. Routing http(s) traffic over ssh on whatever port you like is trivial. The next level up is forcing everything through a http proxy, in which case corkscrew or similar efforts route ssh through the proxy.

I think the only option is to plead with the user to obey your policies and try to ignore those who don't. However I'm very much a novice with networking and would like to know whether blocking websites hosted in other countries is technically feasible despite the above. Any thoughts?
 
you most likely need two security tools to successfully stop this access.
The firewall should be set up to block VPN ports outbound from users and only allow http/https.. out from your proxy. A good proxy like Bluecoat for example can identify tunnelling applications (non legit http/https traffic) and denies the access.
All depends how much money you have to spend.
You may be able to do this with Untangle if you are looking for a free option.
 
Snort might be able to distinguish https from ssh on the same port, but I can't find anything suggesting this is the case. I can't recall anything in the config files suggesting it would be capable of this either.

Corkscrew walks through bluecoat just as happily as it walks through other proxies, link.

I'm interested in technical feasibility here, not in the relative merits of iptables and packet filter. A proof of concept hack would be fine. Google primarily throws up "look how easy it is to break through firewalls, lolz".
 
I think you need a firewall which can inspect applications and also ssl decryption. We use Palo Alto firewalls for this sort of thing at work, but I believe most modern firewall vendors have similar features.

Basically works by decrypting the ssh packet (the clients need to trust a certificate that is installed on the firewall) and it is then able to inspect the actual application so your able to block the ssh tunnel application or allow web traffic.
 
I think you need a firewall which can inspect applications and also ssl decryption. We use Palo Alto firewalls for this sort of thing at work, but I believe most modern firewall vendors have similar features.

Basically works by decrypting the ssh packet (the clients need to trust a certificate that is installed on the firewall) and it is then able to inspect the actual application so your able to block the ssh tunnel application or allow web traffic.

This. Plus of course you need to ensure that your outbound rule base is only allowing connections from the relevant source. If you use a proxy, only allow that outbound on 443. If people don't need SSH out - block it

- GP
 
Back
Top Bottom