Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.74 sec)
Using X Forwarding at its fastest

I need to view a remote device config pages through HTTP and have an SSH Server inside the remote LAN on which it resides.

How can I make it really lightweight and fast on Ubuntu Server - Lucid ?

Thanks.
Asked by:
Shrek
513 points
 Report Abuse
 Share Page - Category: Linux Servers - Tags: Using X Forwarding at its fastest
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (3)

The SSH tunnel will probably work in 90% of cases, but if any of the web pages contain links which refer to an absolute address on the server it will fail. It's better to set up a SOCKS5 proxy via SSH instead:

ssh -D 1080 remote-ssh-host

Then create a PAC (proxy auto-conf) file for your browser along these lines. The following example assumes your private network is 192.168.x.x:

function FindProxyForURL(url, host) {

// Anything on the 192.168 network goes through SOCKS

if ( isInNet(host, "192.168.0.0", "255.255.0.0") ) {

return "SOCKS5 localhost:1080";

}

// Everything else is a direct connection

return DIRECT;

}

Instead of the PAC file you can use the FoxyProxy add-on for Firefox to write similar rules.

Response by:
lgretton
215 points
Use -c blowfish for the fastest compression, it makes a big difference.

Response by:
Mayhew
982 points
The simplest way would be to setup port forwarding through your ssh tunnel.

ssh -L 127.0.0.1:8080:{remote device ip}:80 remote-ssh-host

then point your local browser at http://127.0.0.1:8080/ this would remove all overhead of the X session and allow you to configure the device via its web interface.

Response by:
_SteveWilson ...
4290 points


  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle