Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to stop people bypassing Opendns and squid proxy blocks to get on facebook using ssh tunnel to their pc home. I know I can fix this talking to boss but I'd also like to understand better how is technically possible.

share|improve this question

5 Answers 5

up vote 3 down vote accepted

You need to setup egress (outbound) filtering on your firewall for all TCP and UDP ports except where permitted by requirement (mail server, proxy server, DNS server, etc.).

share|improve this answer
    
Generally problematic if you need to let your users surf the web. –  Shadok Jul 19 '11 at 14:39
2  
@Shadok: that's what a proxy server is for. –  gravyface Jul 19 '11 at 17:23
    
I was thinking about legit SSL traffic, what prevents users from setting up an ssl VPN on port 443 outside the office, from there even with SSL tunneling by web proxies (which are able to check the certificate) I think you can't block anyone from bypassing the rules in place. The only thing I see is QoS to enforce this rule without disrupting legit, common web traffic. –  Shadok Jul 20 '11 at 10:10

Gravyface is right.

Otherwise, maybe DPI (Deep Packet Inspection) could have a pattern to identify tunnels from other SSH traffic but those appliance are costly.

Maybe you could use the TOS (Type of Service) to identify bulk SSH from interactive SSH and apply some bad QoS rules. The down side is that you would impact scp/sftp sessions too.

  • Interactive SSH TOS = 0x10 (16 decimal);
  • Bulk SSH (e.g. SCP, SFTP) TOS = 0x08 (8 decimal).

Tunnels should fall in bulk.

share|improve this answer
    
Too bad for DPI ;D github.com/brl/obfuscated-openssh/blob/master/README –  Shadok Jul 21 '11 at 15:32
    
Yeah I known and the same is true for TOS: it's really not perfect and can be manipulated. –  northox Jul 30 '11 at 2:20

Basicly, you can't fix this. When there 's an open port, people can create tunnels. I myself use OpenVPN via tcp 443, because that's always open. Alternatives are via other protocols, like icmp or dns.

With clever enough users, you cannot block parts of the internet. (Ok, maybe China can ;)) If you don't want workers to go online, block webbrowsing. If they need it for their job, you have to live with the fact that they can get onto facebook. Last resort is creating penalties for everyone who does go to facebook, but I personally wouldn't want to work at a company like that...

share|improve this answer
    
In China they use tor I think :) –  Pitto Jul 19 '11 at 15:54

If you have users that are capable of creating ssh tunnels to their home equipment then you are not going to be able to do this using technology unless you can take away the tools that allow them to do this. All you can do is enter into an arms race with them.

You will have to get your management involved - it really is their issue to deal with.

share|improve this answer
    
Yup, policy first, then enforcement (which could be simply logging the circumvention activity to a syslog server). –  gravyface Jul 19 '11 at 12:53
    
I do understand the suggestion and I've already said in the question that the key of the problem would be just speak about it with the boss. That's an adrministration and not a technical problem... But I was just curious about any tool to control it on the technical side. –  Pitto Jul 19 '11 at 15:54
    
@Pitto: If they have the tools and the know how - you can't stop them. You have to take the tools off them and ensure they can't get them again. –  Iain Jul 19 '11 at 15:58

This is more of a policy issue than a technical one. You correctly point out an obvious method for users to bypass any restrictions you may place on the network technically.

Some percentage of users will not be able to figure out the tunnel approach and those should be easier to contain with DNS blacklists or equivalent. The technical users who would bypass your restrictions need to be dealt with in a different method.

Consider why you need to block this traffic before you travel too far down this road.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.