This is the usual situation where I'm tunnelling from 127.0.0.2:anyport at home, through an SSH server on gateway.dugeenswork.co.uk to remotepc.dugeenswork.co.uk:desiredport, where something running on my remotepc is listening on desiredport (like a SSH server or Remote Desktop).
What I can't do is get this to work when Polipo is running on remotepc and listening on 8123. It'll happily serve requests coming from the session on remotepc, but it refuses all connections coming through the tunnel.
Oddly, when I set netcat to run on remotepc and listen on 8123, with
nc -L -p 8123
it happily communicated through the tunnel. Using the -v option showed me that requests coming through that way showed as coming from gateway's IP address, which was educational as up to now I thought they showed as coming from localhost.
So I thought putting gateway's IP address in allowedClients would fix this - it didn't.
Btw polipo won't read a config file (other than the default in /etc) unless you tell it to with -c.
While I'm on, the polipo local web server doesn't work through the tunnel either. It makes Firefox go into a spin loop allocating memory. nc reported '127.0.0.2: inverse host lookup failed: h_errno 11004: NO_DATA' when tried on this one.
Aha, I've worked out where I was going wrong. It isn't enough to set allowedClients, you also have to set proxyPort to 0.0.0.0 to allow external connections - like this one from the gateway.
This makes the proxy happily deal with requests from the tunnel, and the local web server works too.
Not really happy about that IP-based setup though, I might try the chain tunnelling method with a SSH server on remotepc, so that polipo thinks the requests are coming from remotepc (ie localhost hopefully).
Anti-nuisance lawsuit warning: The purpose of these notes is to remind me, Zoegond, of stuff or to help me work stuff out. They may contain mistakes.
Quick
- ($a, $b....) = unpack("A2A7...", $packed)
- push( array, list )