LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-08-2005, 11:44 PM   #1
Shai
LQ Newbie
 
Registered: Jan 2001
Posts: 8

Rep: Reputation: 0
SSH thru a Firewall with only squid open.


Hoping for a little help... Please bear with me whilst I explain in full as there where a few post with similar request but not quite what I am after.


Generally we support clients via ssh tunnels. The client initiates a connection to us, we join the session and bingo - Instant help.

We have come across a client that will NOT alter thier firewall saying we only allow outbound traffic that can pass thru the proxy (Squid).

So my question: Can you set up a connection from a box on an internal network via a proxy server to another box on the internet all via an SSH tunnel.

I hope I have included enough detail.


Thanks in advance.
 
Old 09-09-2005, 12:58 AM   #2
angrybeaver
Member
 
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104

Rep: Reputation: 17
If the box behind the proxy has a public IP, or they NAT their outbound traffic, you could run up the remote sshd to listen on TCP/80 and have the client connect on this port instead of the default TCP/22 (icky) and bypass the proxy entirely. This makes a few assumptions about their setup though... squid won't perform any TCP socket proxying, only HTTP/HTTPS and FTP.

Last edited by angrybeaver; 09-09-2005 at 12:59 AM.
 
Old 09-09-2005, 03:31 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
We have come across a client that will NOT alter thier firewall saying we only allow outbound traffic that can pass thru the proxy (Squid).
Do I read this right - the client wants only traffic that goes through the proxy?

Presumably you know how to set up ssh connections through an http proxy?

http://www.pantz.org/os/openbsd/squidsetup.shtml
... this seems right up your street, even though it is for openBSD. The principles should be the same.
 
Old 09-09-2005, 06:10 PM   #4
angrybeaver
Member
 
Registered: Aug 2004
Location: .au
Distribution: debian, BSD
Posts: 104

Rep: Reputation: 17
Quote:
Originally posted by Simon Bridge http://www.pantz.org/os/openbsd/squidsetup.shtml
... this seems right up your street, even though it is for openBSD. The principles should be the same. [/B]
Doesn't that link just explain how to setup an SSH tunnel to a host running Squid? His problem is that the ISP won't allow any outbound traffic unless it passes through their squid proxy, which breaks his outbound SSH connection attempts.

He either has to find a hole in their network (ie: exploit their NAT or filtering rules), or ask them to nicely setup a socks proxy for port 22.

There's a tool called 'httptunnel ' floating about which acts as a local socks proxy and can tunnel traffic via HTTP, which could, of course, also use an upstream proxy like squid. Try something like this if all else fails - just don't expect blisteringly fast response times.


Last edited by angrybeaver; 09-09-2005 at 06:18 PM.
 
Old 09-09-2005, 11:06 PM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
... which is why I asked if I had the trouble right... if I punctuate the stated trouble like this:
We have come across a client that will not alter their firewall, saying: "We only allow outbound traffic that can pass thru the proxy." (Squid)

It comes out close to what you suggest.
But this still reads like the client is on a lan (say a corporate net) behind the proxy. The client, somehow, initiates a connection and he joins via ssh as SOP. But he cannot do this because squid is stopping this and the client stipulates - traffic goes through the proxy thanks.

Bypassing, or otherwise penitrating, the proxy would allow for the desired connection. This is true, However, as written, this would be against the client's wishes.

As the problem is described, to offer his support in the manner he is accostomed to, he must connect through the clients proxy server.

This seems logical too. As there seem to be two possible interpretations of the problem - I think a clarification is in order.

Apart from this - the general advise so far should provide a starting point whichever of us got it right

Woo-hoo Shal? Where are you?

Last edited by Simon Bridge; 09-09-2005 at 11:10 PM.
 
Old 09-19-2005, 10:48 PM   #6
Shai
LQ Newbie
 
Registered: Jan 2001
Posts: 8

Original Poster
Rep: Reputation: 0
My appologies for the delay...DO NOT LAUGH _but_ I got hit by a car and ended up in hospital...Well its pretty funny now but it wasn't at the time.

Anyway getting back to the story at hand.

Simon is quite correct in his sumary.

The linux box that is needed to be connected to is on a LAN behind the firewall and proxy. We need to have this box initiate a connection to our access point. As stated the only outbound traffic is via the proxy.

In re-reading AB's first response are you saying that the client machine could ssh out (via 80) and if we set our box to listen on 80 we should be good to go? If this is a yes can you have the sshd listen on more than one port or can you run multiple sshd's simultaneously?

Again sorry for the delay and thanks for the info so far.

Cheers
Shai

aka the Crash Test Dummy
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
open ports on linksys, i have ssh open but thats it PlatinumRik Linux - Security 1 07-07-2005 10:38 AM
webserver behind firewall and squid ultraav Linux - Networking 6 06-17-2004 05:08 PM
Squid & my firewall Apollo77 Linux - General 3 03-19-2004 10:29 AM
firewall and squid keshif Linux - Security 1 01-23-2004 09:25 AM
firewall for SQUID freelinuxcpp Linux - Networking 2 12-01-2003 01:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration