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.
5 Answers
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.
![](../../users/profiles/9517.webp)
- 114,104
- 20
- 206
- 289
-
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. – user9517 Jul 19 '11 at 15:58
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.).
![](../../users/profiles/13008.webp)
- 13,947
- 16
- 65
- 100
-
-
2
-
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
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...
![](../../users/profiles/15501.webp)
- 953
- 1
- 6
- 19
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.
![](../../users/profiles/38781.webp)
- 187
- 1
- 8
-
Too bad for DPI ;D https://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 02:20
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.
![](../../users/profiles/76707.webp)
- 24,720
- 2
- 40
- 69