Reply
Thread Tools
Posts: 542 | Thanked: 117 times | Joined on Sep 2008 @ 52 N, 6 E
#1
I want to use ssh tunneling via a proxy server.
So I do (as root) on the tablet

ssh -D80 user@myserver.com

and the I want to set the proxy for the browser to localhost:80 but I cannot set the proxy. I can only set the proxy per connection, which means that the ssh connection also goes over the proxy.

Is there a way that I can only proxy certain ports or with a particular program ?

UPDATE: I found in this thread http://www.internettablettalk.com/fo...ad.php?t=11294
that I can set a proxy in about:config.
It did work with the same wrong result as setting the connection proxy:
while
ssh -D 80 user@myserver

was open, the browser returned an empty page without error.

Any ideas on this ?
__________________
Nokia N810 FW version 5.2008.43-7
iPad 2 (iOS 4.3.2) Macbook Pro (10.6.6)
Nokia 5800 phone FW 62.0.0125

Last edited by skatebiker; 2009-01-05 at 22:10.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#2
skatebiker:

Try a different proxy port. You shouldn't use port 80, since that is the "normal" HTTP port. Use something like 3210 (as in my example), because that is an unused port.

I haven't tried this for many months, but it should still work...

EDIT: Just tested things, still works!

EDIT2: Looks like you just have to hit your "turn proxy on" bookmark to turn the proxy on, rather than load the bookmark and then hit the submit button like you used to have to do.

EDIT3: don't forget to set network.proxy.socks_remote_dns to 1 or true for properly secure browsing...
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!

Last edited by qole; 2009-01-06 at 00:37.
 

The Following 3 Users Say Thank You to qole For This Useful Post:
brendan's Avatar
Posts: 531 | Thanked: 79 times | Joined on Oct 2006 @ This side of insane, that side of genius
#3
why the -D, and not -L? what does the Dynamic functionality offer?
__________________
Nokia n800
OS 2008
Pharos iGPS 360-BT
ElmScan 5 BlueTooth
BlackBerry Bold (9000)
AT&T Wireless
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#4
Originally Posted by brendan View Post
why the -D, and not -L? what does the Dynamic functionality offer?
A SOCKS proxy, which can proxy any connection to anywhere, instead of a simple port-forward. With -L, you'd have to make a new one for each host you wanted to browse to, or (more feasibly) have a remote (HTTP or SOCKS) proxy and forward everything to it.

With -D, you don't need the remote proxy.
 
Posts: 174 | Thanked: 71 times | Joined on Aug 2007
#5
Not sure if it's what you're after, but I run a squid proxy at home, set up an ssh tunnel, and I change the proxy settings to route http and https traffic across the tunnel. Rather than being an application setting, it's an advanced setting in the connection dialog.

Either method you choose, use it in conjunction with dbus-scripts to have the tunnel established whenever you connect to a wifi access point.
 
Posts: 542 | Thanked: 117 times | Joined on Sep 2008 @ 52 N, 6 E
#6
Originally Posted by qole View Post
skatebiker:

Try a different proxy port. You shouldn't use port 80, since that is the "normal" HTTP port. Use something like 3210 (as in my example), because that is an unused port.

I haven't tried this for many months, but it should still work...

EDIT: Just tested things, still works!

EDIT2: Looks like you just have to hit your "turn proxy on" bookmark to turn the proxy on, rather than load the bookmark and then hit the submit button like you used to have to do.

EDIT3: don't forget to set network.proxy.socks_remote_dns to 1 or true for properly secure browsing...

Bit I see also a setting

network.proxy.http localhost
network.proxy.http_port 80

How can I remove these settings ?
The about config does not have an option to remove settings.
Setting an empty string does not remove it.
__________________
Nokia N810 FW version 5.2008.43-7
iPad 2 (iOS 4.3.2) Macbook Pro (10.6.6)
Nokia 5800 phone FW 62.0.0125
 
brendan's Avatar
Posts: 531 | Thanked: 79 times | Joined on Oct 2006 @ This side of insane, that side of genius
#7
ok, so -D is a socks-like attempt to proxy connections, but not really a socks proxy?

also, from my readings on privoxy and tor, does the -D forwarding "leak" DNS queries like socks4? when using privoxy in combination with tor, one must forward requests from privoxy to tor using only forward-socks4a directives to avoid DNS leaks.
__________________
Nokia n800
OS 2008
Pharos iGPS 360-BT
ElmScan 5 BlueTooth
BlackBerry Bold (9000)
AT&T Wireless
 
Posts: 542 | Thanked: 117 times | Joined on Sep 2008 @ 52 N, 6 E
#8
I finally succeeded with -D 3210.

I filled in
network.proxy.http <empty>
network.proxy.http_port 0

restarted the browser by clicking on a bookmark which sets network.proxy.type to 1.
Then I saw the IP address of the proxy to which I had an open SSH connection with -D 3210.
__________________
Nokia N810 FW version 5.2008.43-7
iPad 2 (iOS 4.3.2) Macbook Pro (10.6.6)
Nokia 5800 phone FW 62.0.0125
 

The Following User Says Thank You to skatebiker For This Useful Post:
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#9
Originally Posted by brendan View Post
ok, so -D is a socks-like attempt to proxy connections, but not really a socks proxy?
It is a SOCKS proxy, just one that happens to route all proxied connections via a secure channel to the remote server.

also, from my readings on privoxy and tor, does the -D forwarding "leak" DNS queries like socks4? when using privoxy in combination with tor, one must forward requests from privoxy to tor using only forward-socks4a directives to avoid DNS leaks.
AFAIK, it's SOCKS4/5 (not 4a, so requires IPs, not FQDNs), but it can handle any traffic, including DNS, if you make the DNS requests through the proxy. So if you can make your software (e.g. MicroB, which can) perform DNS lookup via TCP, you can push it through SOCKS to the DNS server, and then make a connection to the resulting IP through SOCKS. Qole's instructions included a setting for that. (I think...)

With an appropriately compiled TSOCKS, also, DNS can be forced to TCP, and SOCKSified. I'm not sure if a version compiled that way is about. (And TSOCKS, if you can get it working right, makes everything run through the tunnel instead of configuring each app separately.)

Finally, you could just use socat or netcat to run DNS over UDP over TCP over SSH -- it's not as hard as it sounds.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#10
Originally Posted by Benson View Post
So if you can make your software (e.g. MicroB, which can) perform DNS lookup via TCP, you can push it through SOCKS to the DNS server, and then make a connection to the resulting IP through SOCKS. Qole's instructions included a setting for that. (I think...)
I mentioned it in this thread, but my original instructions don't mention it.

Originally Posted by qole View Post
don't forget to set network.proxy.socks_remote_dns to 1 or true for properly secure browsing...
Originally Posted by Benson View Post
And TSOCKS, if you can get it working right, makes everything run through the tunnel instead of configuring each app separately...
Except the browser, sadly, which is why you have to do this convoluted way using about:config instead of the much more elegant tsocks.

There may be a way to restart browserd so that it uses tsocks, but in my experience, restarting browserd tends to have unwanted side effects.
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Reply


 
Forum Jump


All times are GMT. The time now is 16:55.