On Fri, Jan 24, 2020 at 10:08:02AM +0000, Chris Green wrote:
On Fri, Jan 24, 2020 at 09:59:55AM +0000, Chris Green wrote:
I have a Kobo eReader which connects to a local network by WiFi. It uses the connection to download books (surprise) and also to do other things with my library on-line account.
All very well when I'm in the UK but for (stupid?) reasons known only to themselves the Kobo/Overdrive/Library software and connections work only when the Kobo is connected to a UK IP address.
So, when I'm trotting around the world, or more likely when I'm sitting in my little boat in France, I can't get the Kobo to update even though I have books available at the library. What makes it even sillier is that I *can* read the books on my laptop, even when connected from France, so it's not an issue about "you can't read that book in France" it's just a quirk of the eReader software.
Anyway, down to the question, what's the simplest way to get a connection to the eReader such that the library/Overdrive software will think it's in the UK?
I can see that it *could* be done with two VPN aware routers, one in the UK (I have Drayteks at home which can do VPN) and one here on the boat. However that does seem a rather heavyweight solution just to connect a single WiFi device. (and I don't have a VPN capable router here at the moment though in the longer term I could bring one out)
Is there any other way of doing it (VPN or not, ssh maybe)? I already use an ssh proxy occasionally to allow my laptop to seem to be in the UK so I can connect to my NHS Doctor site (silly restriction again!). However I can't do this (so easily) with the eReader because it's basically a 'closed' system with just the eReader software in it.
Any bright ideas anyone?
I see I asked something similar a while ago, I still haven't got around to doing anything though! Sorry for the repeat but any further ideas would still be useful.
I was going to try TunnelBear VPN but then realised it needs a smart phone (unless there's a laptop version) and I don't use a smartphone any more.
Well, if anyone is interested, I've managed it as follows:-
Set up my laptop as a WiFi hotspot, Network Manager can do it though it's a bit convoluted and difficult to turn on and off. I've used nmcli which seems a bit more direct.
Install a little daemon called redsocks, this redirects TCP connections to a proxy, i.e. when someone connects to the laptop hotspot redsocks grabs the connection and feeds it on to....
An ssh proxy, standard stuff 'ssh -fC2qTnN -D 8080 <host>'
... and finally some iptables stuff to do NAT, I think.
The whole is strung together as a script:-
# # # # Disconnect any existing WiFi # nmcli device disconnect wlp4s0 # # # Activate the WiFi hotspot # nmcli radio wifi on nmcli connection up 'WiFi Hotspot' # # # Set up Socks proxy. Firefox can use this proxy directly as well. # ssh -fC2qTnN -D 8080 user@host # # # Now do iptables configuration so WiFi connections get to redsocks # sudo iptables -F sudo iptables -t nat -F sudo iptables -t nat -A PREROUTING -s 10.42.0.0/24 -p tcp -j REDIRECT --to-ports 12345
Quite simple when you know how! (there's a little configuration of redsocks to but it's quite easy)