Skip to contentSkip to conversation

Tunneling other protocols over TCP port 80

DISCUSSION Bruno Negrão 4 participants 9 messages Jun 21, 2005

lore
Share & tools
lore
#0 lore raw

Hi guys,

I need to create a VPN to my linux server from a remote workstation(windows) inside a private network of another company. The LAN where the workstation is located is protected by a firewall. This firewall only lets pass through outgoing traffic to port 80(http).

I need this workstation to telnet a telnet server inside my private network. Is it possible to set up a tunnel over port 80 to create a VPN between the workstation and my gateway, so that the workstation can telnet my internal server?

The network administrator where this workstation is located is inaccessible, so I have to create this workaround.

Thank you,
-------------------------------------------------
Bruno Negrao - Support Analyst
Engepel Teleinformática. 55-31-34812311
Belo Horizonte, MG, Brazil

#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I might be reading this incorrectly, but the way I do read it you are thinking of breaking a security policy to connect to your home network from a work location?

Thanks,

Ron DuFresne

Quoted 6 lines · Bruno Negrão

Hi guys,

I need to create a VPN to my linux server from a remote workstation(windows) inside a private network of another company. The LAN where the workstation is located is protected by a firewall. This firewall only lets pass through outgoing traffic to port 80(http).

I need this workstation to telnet a telnet server inside my private network. Is it possible to set up a tunnel over port 80 to create a VPN between the workstation and my gateway, so that the workstation can telnet my internal server?

Quoted 8 lines

The network administrator where this workstation is located is inaccessible, so I have to create this workaround.

Thank you,
-------------------------------------------------
Bruno Negrao - Support Analyst
Engepel Teleinformática. 55-31-34812311
Belo Horizonte, MG, Brazil

- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
admin & senior security consultant: sysinfo.com
http://sysinfo.com
Key fingerprint = 9401 4B13 B918 164C 647A E838 B2DF AFCC 94B0 6629

...We waste time looking for the perfect lover
instead of creating the perfect love.

-Tom Robbins <Still Life With Woodpecker>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCuGeDst+vzJSwZikRAgh2AJ0Ss1sElKLuDkTfMETWhveZTV8/oQCeJ0oQ DcnCWavJ6bdxE2ZSuZeo1ok=
=v+xC
-----END PGP SIGNATURE-----

#2 lore raw
In reply to Bruno Negrão

Bad security policies aside.... :)

You could always run the telnet server on port 80. Or run netcat (aka nc) on the box on port 80 redirecting to port 23.

-Damon-

Quoted 16 lines · On Tue, 21 Jun 2005, [iso-8859-1] Bruno Negrão wrote:

Hi guys,

I need to create a VPN to my linux server from a remote workstation(windows) inside a private network of another company. The LAN where the workstation is located is protected by a firewall. This firewall only lets pass through outgoing traffic to port 80(http).

I need this workstation to telnet a telnet server inside my private network. Is it possible to set up a tunnel over port 80 to create a VPN between the workstation and my gateway, so that the workstation can telnet my internal server?

The network administrator where this workstation is located is inaccessible, so I have to create this workaround.

Thank you,
-------------------------------------------------
Bruno Negrao - Support Analyst
Engepel Teleinformática. 55-31-34812311
Belo Horizonte, MG, Brazil

#3 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 5 lines · Damon Gray

Bad security policies aside.... :)

You could always run the telnet server on port 80. Or run netcat (aka nc) on the box on port 80 redirecting to port 23.

He could, if he wanted to really violate the policies in place and tunnel traffic in the clear. he's actually asking about something that would be deemed a tad more seucre/private in nature, though still likely a violation os the security policies currently in place and thus subjecting himself to likely termination once the tunnel was discovered, let alone potential prosecution.

Thanks,

Ron DuFresne

Quoted 9 lines · On Tue, 21 Jun 2005, [iso-8859-1] Bruno Negrão wrote:
Quoted 7 lines

Hi guys,

I need to create a VPN to my linux server from a remote workstation(windows) inside a private network of another company. The LAN where the workstation is located is protected by a firewall. This firewall only lets pass through outgoing traffic to port 80(http).

I need this workstation to telnet a telnet server inside my private network. Is it possible to set up a tunnel over port 80 to create a VPN between the workstation and my gateway, so that the workstation can telnet my internal server?

Quoted 9 lines
Quoted 8 lines

The network administrator where this workstation is located is inaccessible, so I have to create this workaround.

Thank you,
-------------------------------------------------
Bruno Negrao - Support Analyst
Engepel Teleinformática. 55-31-34812311
Belo Horizonte, MG, Brazil

- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
admin & senior security consultant: sysinfo.com
http://sysinfo.com
Key fingerprint = 9401 4B13 B918 164C 647A E838 B2DF AFCC 94B0 6629

...We waste time looking for the perfect lover
instead of creating the perfect love.

-Tom Robbins <Still Life With Woodpecker>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCuG9Yst+vzJSwZikRAgeQAJkBQRMIkhqTvT9XAUU5Ri5e+ybzigCgzXEA AvPSv6yw4Em98204pnSEhWk=
=iaYC
-----END PGP SIGNATURE-----

#4 lore raw

Then if you wanted better security (not in the clear telnet) then you can use ssh tunneling to port 80.

-Damon-

Quoted 64 lines · R. DuFresne
Quoted 6 lines · Damon Gray

Bad security policies aside.... :)

You could always run the telnet server on port 80. Or run netcat (aka nc) on the box on port 80 redirecting to port 23.

He could, if he wanted to really violate the policies in place and tunnel traffic in the clear. he's actually asking about something that would be deemed a tad more seucre/private in nature, though still likely a violation os the security policies currently in place and thus subjecting himself to likely termination once the tunnel was discovered, let alone potential prosecution.

Thanks,

Ron DuFresne

Quoted 18 lines · On Tue, 21 Jun 2005, [iso-8859-1] Bruno Negr�o wrote:
Quoted 16 lines

Hi guys,

I need to create a VPN to my linux server from a remote workstation(windows) inside a private network of another company. The LAN where the workstation is located is protected by a firewall. This firewall only lets pass through outgoing traffic to port 80(http).

I need this workstation to telnet a telnet server inside my private network. Is it possible to set up a tunnel over port 80 to create a VPN between the workstation and my gateway, so that the workstation can telnet my internal server?

The network administrator where this workstation is located is inaccessible, so I have to create this workaround.

Quoted 7 lines
Quoted 6 lines

Thank you,
-------------------------------------------------
Bruno Negrao - Support Analyst
Engepel Teleinform�tica. 55-31-34812311
Belo Horizonte, MG, Brazil

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
admin & senior security consultant: sysinfo.com
http://sysinfo.com
Key fingerprint = 9401 4B13 B918 164C 647A E838 B2DF AFCC 94B0 6629

...We waste time looking for the perfect lover
instead of creating the perfect love.

-Tom Robbins <Still Life With Woodpecker>
------------ Output from gpg ------------
gpg: Signature made Tue Jun 21 15:49:44 2005 EDT using DSA key ID 94B06629
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
gpg: Can't check signature: public key not found

#5 lore raw
In reply to R. DuFresne

Hi Ron,

Thanks for the warning. Actually, we already tried to create a PPTP vpn from that client to my gateway server, but the remote network administrator couldn't manage his equipment to let the appropriate packages to pass. (he doesn't understand GRE no way).

I will inform him we're setting up this new vpn tunnel. I just don't want to ask him to move, since he doesn't have the skills to make it.

Damon, thanks for the note on the ssh tunnel. Can you point me a document to look for this kind of configuration?

Regards,
Bruno.

----- Original Message ----- From: "R. DuFresne" <[email protected]>
To: "Damon Gray" <[email protected]>
Cc: "Bruno Negrão" <[email protected]>; <[email protected]>
Sent: Tuesday, June 21, 2005 4:49 PM
Subject: Re: Tunneling other protocols over TCP port 80

Quoted 67 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Damon Gray

Bad security policies aside.... :)

You could always run the telnet server on port 80. Or run netcat (aka nc) on the box on port 80 redirecting to port 23.

He could, if he wanted to really violate the policies in place and tunnel traffic in the clear. he's actually asking about something that would be deemed a tad more seucre/private in nature, though still likely a violation os the security policies currently in place and thus subjecting himself to likely termination once the tunnel was discovered, let alone potential prosecution.

Thanks,

Ron DuFresne

Quoted 18 lines · On Tue, 21 Jun 2005, [iso-8859-1] Bruno Negrão wrote:
Quoted 16 lines

Hi guys,

I need to create a VPN to my linux server from a remote workstation(windows) inside a private network of another company. The LAN where the workstation is located is protected by a firewall. This firewall only lets pass through outgoing traffic to port 80(http).

I need this workstation to telnet a telnet server inside my private network. Is it possible to set up a tunnel over port 80 to create a VPN between the workstation and my gateway, so that the workstation can telnet my internal server?

The network administrator where this workstation is located is inaccessible, so I have to create this workaround.

Quoted 7 lines
Quoted 6 lines

Thank you,
-------------------------------------------------
Bruno Negrao - Support Analyst
Engepel Teleinformática. 55-31-34812311
Belo Horizonte, MG, Brazil

- --
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
admin & senior security consultant: sysinfo.com
http://sysinfo.com
Key fingerprint = 9401 4B13 B918 164C 647A E838 B2DF AFCC 94B0 6629

...We waste time looking for the perfect lover
instead of creating the perfect love.

-Tom Robbins <Still Life With Woodpecker>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCuG9Yst+vzJSwZikRAgeQAJkBQRMIkhqTvT9XAUU5Ri5e+ybzigCgzXEA AvPSv6yw4Em98204pnSEhWk=
=iaYC
-----END PGP SIGNATURE-----

#6 lore raw

The easiest way would probably be to do the following:

On the remote linux host, run SSH on port 80 (or possibly use netcat to forward port 80 to port 22 or look into iptables REDIRECT target).

Then if you want to be able to use telnet (which isn't necessary if you are running ssh to the box but maybe there is some other need for telnet like automation of something, "I don't want to know" ;)

Then run ssh on the internal box:

ssh -p 80 -L 2023:localhost:23 <outsideboxip>

Then on the local box you can "telnet localhost 2023" and you will be magically connected to port 23 on the outside box but over an encrypted tunnel.

If you don't have OpenSSH on the windows box you can use putty for port forwarding, I think.

Disclaimer: I hold no responsability for what this technique is being used for. I like giving solutions, I don't want to know why. :)

For more info "man ssh" or http://www.oreillynet.com/pub/a/wireless/2001/02/23/wep.html

-Damon-

Quoted 88 lines · On Tue, 21 Jun 2005, [iso-8859-1] Bruno Negr�o wrote:

Hi Ron,

Thanks for the warning. Actually, we already tried to create a PPTP vpn from that client to my gateway server, but the remote network administrator couldn't manage his equipment to let the appropriate packages to pass. (he doesn't understand GRE no way).

I will inform him we're setting up this new vpn tunnel. I just don't want to ask him to move, since he doesn't have the skills to make it.

Damon, thanks for the note on the ssh tunnel. Can you point me a document to look for this kind of configuration?

Regards,
Bruno.

----- Original Message ----- From: "R. DuFresne" <[email protected]>
To: "Damon Gray" <[email protected]>
Cc: "Bruno Negr�o" <[email protected]>; <[email protected]>
Sent: Tuesday, June 21, 2005 4:49 PM
Subject: Re: Tunneling other protocols over TCP port 80

Quoted 66 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Damon Gray

Bad security policies aside.... :)

You could always run the telnet server on port 80. Or run netcat (aka nc) on the box on port 80 redirecting to port 23.

He could, if he wanted to really violate the policies in place and tunnel traffic in the clear. he's actually asking about something that would be deemed a tad more seucre/private in nature, though still likely a violation os the security policies currently in place and thus subjecting himself to likely termination once the tunnel was discovered, let alone potential prosecution.

Thanks,

Ron DuFresne

Quoted 18 lines · On Tue, 21 Jun 2005, [iso-8859-1] Bruno Negr�o wrote:
Quoted 16 lines

Hi guys,

I need to create a VPN to my linux server from a remote workstation(windows) inside a private network of another company. The LAN where the workstation is located is protected by a firewall. This firewall only lets pass through outgoing traffic to port 80(http).

I need this workstation to telnet a telnet server inside my private network. Is it possible to set up a tunnel over port 80 to create a VPN between the workstation and my gateway, so that the workstation can telnet my internal server?

The network administrator where this workstation is located is inaccessible, so I have to create this workaround.

Quoted 7 lines
Quoted 6 lines

Thank you,
-------------------------------------------------
Bruno Negrao - Support Analyst
Engepel Teleinform�tica. 55-31-34812311
Belo Horizonte, MG, Brazil

- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
admin & senior security consultant: sysinfo.com
http://sysinfo.com
Key fingerprint = 9401 4B13 B918 164C 647A E838 B2DF AFCC 94B0 6629

...We waste time looking for the perfect lover
instead of creating the perfect love.

-Tom Robbins <Still Life With Woodpecker>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCuG9Yst+vzJSwZikRAgeQAJkBQRMIkhqTvT9XAUU5Ri5e+ybzigCgzXEA AvPSv6yw4Em98204pnSEhWk=
=iaYC
-----END PGP SIGNATURE-----

#7 lore raw
In reply to Bruno Negrão

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Bruno,

Hope you mind not really my asking about site policy before stepping into the fire. the man page for sshd is a good place to start, you'll find you can add a -p port setting to the startup of sshd and I'm sure there is a setting in the sshd_conf files for a binding port,. in your case 80. Then a quick look over the man page for ssh will show that you'll also need to tell the client <ssh> via the -p option which port to look for the sshd on the far end you are trying to reach. Make sure the sec admin is aware of this bypass tunnel and put into sshd/tcpd options to limit connections to only those that would use this tunnel, it will be found by those scanning nets for entry points so do not relay upon the obscurity through security methods that some feel warm and fuzzy with.

Thanks,

Ron DuFresne

Quoted 8 lines · Bruno Negrão

Hi Ron,

Thanks for the warning. Actually, we already tried to create a PPTP vpn from that client to my gateway server, but the remote network administrator couldn't manage his equipment to let the appropriate packages to pass. (he doesn't understand GRE no way).

I will inform him we're setting up this new vpn tunnel. I just don't want to ask him to move, since he doesn't have the skills to make it.

Damon, thanks for the note on the ssh tunnel. Can you point me a document to look for this kind of configuration?

Quoted 78 lines

Regards,
Bruno.

----- Original Message ----- From: "R. DuFresne" <[email protected]>
To: "Damon Gray" <[email protected]>
Cc: "Bruno Negrão" <[email protected]>; <[email protected]>
Sent: Tuesday, June 21, 2005 4:49 PM
Subject: Re: Tunneling other protocols over TCP port 80

Quoted 66 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Damon Gray

Bad security policies aside.... :)

You could always run the telnet server on port 80. Or run netcat (aka nc) on the box on port 80 redirecting to port 23.

He could, if he wanted to really violate the policies in place and tunnel traffic in the clear. he's actually asking about something that would be deemed a tad more seucre/private in nature, though still likely a violation os the security policies currently in place and thus subjecting himself to likely termination once the tunnel was discovered, let alone potential prosecution.

Thanks,

Ron DuFresne

Quoted 18 lines · On Tue, 21 Jun 2005, [iso-8859-1] Bruno Negrão wrote:
Quoted 16 lines

Hi guys,

I need to create a VPN to my linux server from a remote workstation(windows) inside a private network of another company. The LAN where the workstation is located is protected by a firewall. This firewall only lets pass through outgoing traffic to port 80(http).

I need this workstation to telnet a telnet server inside my private network. Is it possible to set up a tunnel over port 80 to create a VPN between the workstation and my gateway, so that the workstation can telnet my internal server?

The network administrator where this workstation is located is inaccessible, so I have to create this workaround.

Quoted 7 lines
Quoted 6 lines

Thank you,
-------------------------------------------------
Bruno Negrao - Support Analyst
Engepel Teleinformática. 55-31-34812311
Belo Horizonte, MG, Brazil

- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
admin & senior security consultant: sysinfo.com
http://sysinfo.com
Key fingerprint = 9401 4B13 B918 164C 647A E838 B2DF AFCC 94B0 6629

...We waste time looking for the perfect lover
instead of creating the perfect love.

-Tom Robbins <Still Life With Woodpecker>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCuG9Yst+vzJSwZikRAgeQAJkBQRMIkhqTvT9XAUU5Ri5e+ybzigCgzXEA AvPSv6yw4Em98204pnSEhWk=
=iaYC
-----END PGP SIGNATURE-----

- -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
admin & senior security consultant: sysinfo.com
http://sysinfo.com
Key fingerprint = 9401 4B13 B918 164C 647A E838 B2DF AFCC 94B0 6629

...We waste time looking for the perfect lover
instead of creating the perfect love.

-Tom Robbins <Still Life With Woodpecker>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFCuHaust+vzJSwZikRAhHJAKC4E3417lftYHwisbY7KbhVfVFeEQCfdnGs yvVGLpRTOVFmv6xtdJPCJhY=
=D4XD
-----END PGP SIGNATURE-----

#8 lore raw
In reply to Bruno Negrão

If all you want is a remote and/or secure shell, just use SSH like the others already said. If you MUST have full VPN, setup OpenVPN on the remote linux box, as it can run on any single TCP/UDP port. See http://openvpn.net/howto.html for details.

-Pablo

Quoted 16 lines · Bruno Negrão

Hi guys,

I need to create a VPN to my linux server from a remote workstation(windows) inside a private network of another company. The LAN where the workstation is located is protected by a firewall. This firewall only lets pass through outgoing traffic to port 80(http).

I need this workstation to telnet a telnet server inside my private network. Is it possible to set up a tunnel over port 80 to create a VPN between the workstation and my gateway, so that the workstation can telnet my internal server?

The network administrator where this workstation is located is inaccessible, so I have to create this workaround.

Thank you,
-------------------------------------------------
Bruno Negrao - Support Analyst
Engepel Teleinformática. 55-31-34812311
Belo Horizonte, MG, Brazil