Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Patrick Wigmore
On Sat, 20 Jun 2020 17:22:02 +0100, Terry Coles wrote:
> On Saturday, 20 June 2020 15:21:40 BST Terry Coles wrote:
> > What's the minimum needed to get something up on the Internet that
> > would respond to a query of some kind?  I've looked at various
> > Tutorials and they all seem to be a fair bit of work.  I have
> > another Pi which could be used in place of the one running the
> > two servers, so is there something quick and dirty just to do
> > this test?
> 
> I just tried traceroute to see if the Home Router could be reached. 
> It does look as if using my phone's hotspot could be the problem
> because although traceroute 8.8.8.8 completed in 14 hops after ~68
> ms, traceroute  never completed after 64 hops. 
> There was a lot of stuff happening between hops 11 and 17 with
> multiple IP Addresses being listed, but no sign of my Router's
> address.
> 
> Have I interpreted this correctly?  It would appear to me that the
> packets never arrive for some reason.

That's a good idea. (Running traceroute.)

I would interpret that result to mean that the network knows a route 
to the Home Router, but beyond a certain point along the route, no 
response packets are returned, for whatever reason. Probably the Home 
Router is ignoring the packets, but the same result would occur if a 
router along the way was blocking either the requests or the 
responses.

Or, it could mean that there are more than 64 hops between the laptop 
connected to the hotspot and your Home Router, but that seems pretty 
unlikely.

I just tried pinging my own home router over a mobile network.

  $ traceroute 

doesn't complete after 64 hops, but

  $ traceroute -I 

completes after 18 hops. The -I option is to 'Use ICMP ECHO as probe.'

In both cases, the same set of IP addresses is listed for the earlier 
hops (i.e. the same route is used).

When I configure the router to not respond to pings, the traceroute 
never completes, regardless of whether -I is used.

Patrick

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Terry Coles
On Saturday, 20 June 2020 17:21:04 BST Patrick Wigmore wrote:
> You could use Python 3's http.server module, which you probably
> already have installed.

I asked for simple and that's what you gave me.

I'll give it a go tomorrow (I have things to do this evening).

The developer of PiStrong has come back to me in the last hour with a promise 
of an update to his code by Monday.  If I can prove the hotspot is working or 
otherwise by then I would feel a bit more confident that this might work 
eventually.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Terry Coles
On Saturday, 20 June 2020 15:21:40 BST Terry Coles wrote:
> What's the minimum needed to get something up on the Internet that would
> respond to a query of some kind?  I've looked at various Tutorials and they
> all seem to be a fair bit of work.  I have another Pi which could be used in
> place of the one running the two servers, so is there something quick and
> dirty just to do this test?

I just tried traceroute to see if the Home Router could be reached.  It does 
look as if using my phone's hotspot could be the problem because although 
traceroute 8.8.8.8 completed in 14 hops after ~68 ms, traceroute  never completed after 64 hops.  There was a lot of stuff happening 
between hops 11 and 17 with multiple IP Addresses being listed, but no sign of 
my Router's address.

Have I interpreted this correctly?  It would appear to me that the packets 
never arrive for some reason.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Patrick Wigmore
On Sat, 20 Jun 2020 15:21:40 +0100, Terry Coles wrote:
> > Personally my next step would be to temporarily stick some
> > relatively easy-to-configure server of some kind online via the
> > home router. E.g. a web server serving a unique web page, and
> > then try to connect to that via the phone hotspot. That would at
> > least prove whether you can connect to the home router from the
> > Hotspot, which seems to be your aim with pinging it.
> 
> I could try that, although I could end up doing a lot of work only
> to learn that there's nothing wrong.  I already have the Pi running
> the VPN Server and nginx, but the webserver is only accessible from
> the internal (private) network.
> 
> What's the minimum needed to get something up on the Internet that
> would respond to a query of some kind?  I've looked at various
> Tutorials and they all seem to be a fair bit of work.  I have
> another Pi which could be used in place of the one running the two
> servers, so is there something quick and dirty just to do this
> test?

You could use Python 3's http.server module, which you probably 
already have installed.

Running

$ python -m http.server 8000

will serve the contents of the current directory. It runs in the 
foreground until you exit from it.

It's documented here:
https://docs.python.org/3/library/http.server.html#http-server-cli

So, e.g.

$ mkdir httptest
$ cd httptest
$ echo "Some somewhat unique text" > file.txt
$ python -m http.server 8000

Obviously you can use a different port if it's more convenient.

If `python` points to Python 2 rather than Python 3, then you may need 
to do

$ python3 -m http.server 8000

instead. Alternatively, the python 2 equivalent is

$ python -m SimpleHTTPServer 8000

Patrick

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Terry Coles
On Saturday, 20 June 2020 15:21:40 BST Terry Coles wrote:
> What's the minimum needed to get something up on the Internet that would
> respond to a query of some kind?  I've looked at various Tutorials and they
> all seem to be a fair bit of work.  I have another Pi which could be used in
> place of the one running the two servers, so is there something quick and
> dirty just to do this test?

Also.  If I make a mistake installing this, I could end up with a double 
whammy.  ;-)

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Terry Coles
On Saturday, 20 June 2020 14:48:50 BST Patrick Wigmore wrote:
> Could you elaborate on what you mean by the Cert settings? Is that
> something to do with the VPN software? Which VPN software did you end
> up choosing anyway?! I don't remember you saying. :)

Yes.  The VPN Tools create a Cert Package which users then install on their 
device.

I decided to go with PiStrong (https://github.com/gitbls/pistrong) because 
PiVPN (a Pi installer for OpenVPN stopped the Captive Portal working.

I'm beginning to regret this decision because it would appear that I have 
become the Beta Tester for the tool.  The developer is very kindly helping me, 
but he doesn't appear to have tested installing it on a machine that has no 
Domain name.  So I'm the guinea pig for all potential users who want to 
connect via their Router's WAN Address.

> I've heard of mobile networks faking ping responses for whatever
> reason. Maybe in hotspot mode it disables that "feature", or enables
> one that blocks all pings. Either way, I wouldn't trust the mobile
> network not to be tricking you with regard to pings.

I can ping everything else, just not my Howe Router.

> Personally my next step would be to temporarily stick some relatively
> easy-to-configure server of some kind online via the home router. E.g.
> a web server serving a unique web page, and then try to connect to
> that via the phone hotspot. That would at least prove whether you can
> connect to the home router from the Hotspot, which seems to be your
> aim with pinging it.

I could try that, although I could end up doing a lot of work only to learn 
that there's nothing wrong.  I already have the Pi running the VPN Server and 
nginx, but the webserver is only accessible from the internal (private) 
network.

What's the minimum needed to get something up on the Internet that would 
respond to a query of some kind?  I've looked at various Tutorials and they 
all seem to be a fair bit of work.  I have another Pi which could be used in 
place of the one running the two servers, so is there something quick and 
dirty just to do this test?

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Patrick Wigmore
On Sat, 20 Jun 2020 10:53:14 +0100, Terry Coles wrote:
> I'm trying to test my Raspberry Pi VPN Server which is currently
> installed in my workroom.  It has Internet access on one side via
> my Home Router and access to my Pi network on the other.  I have
> successfully tested this setup from inside my home network using
> the IP Address of the server in the Cert settings, so I know the
> system basically works.

Could you elaborate on what you mean by the Cert settings? Is that 
something to do with the VPN software? Which VPN software did you end 
up choosing anyway?! I don't remember you saying. :)

> However, I can't ping my Home Router's WAN address.  if I disable
> the hotspot, I can ping it successfully from my Android phone.

I've heard of mobile networks faking ping responses for whatever 
reason. Maybe in hotspot mode it disables that "feature", or enables 
one that blocks all pings. Either way, I wouldn't trust the mobile 
network not to be tricking you with regard to pings.

Personally my next step would be to temporarily stick some relatively 
easy-to-configure server of some kind online via the home router. E.g. 
a web server serving a unique web page, and then try to connect to 
that via the phone hotspot. That would at least prove whether you can 
connect to the home router from the Hotspot, which seems to be your 
aim with pinging it.

Patrick

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Filesystem in a LUKS volume unmounts randomly on Raspberry Pi

2020-06-20 Thread Patrick Wigmore
On Fri, 19 Jun 2020 09:25:28 +0100, Hamish McIntyre-Bhatty wrote:
> - /dev/sda3 is a 200GB LUKS container (/dev/dm-0) with an EXT4
> partition inside, which I use for syncing files between my laptop
> and desktop with Nextcloud.
> 
> This is generally very quick and reliable, but the EXT4 filesystem
> inside the LUKS container randomly (can be an hour, can be 3 weeks)
> unmounts, and there don't seem to be any errors in /var/log/messages
> pertaining to this. The other filesystems always stay mounted
> though.

> Any ideas?

I wonder if it makes a difference what tools you use to unlock and 
mount the LUKS container and partition. E.g. cryptsetup, mount, 
udisksctl, some GUI tool (which might depend on udisks2), or something 
else.

The most similar thing I've recently encountered was having a USB 
flash drive get unmounted and re-enumerated (from /dev/sda to
/dev/sdb) during an out-of-memory event (while running ffmpeg on a BT 
Home Hub).

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Terry Coles
On Saturday, 20 June 2020 13:49:10 BST Hamish McIntyre-Bhatty wrote:
> The only thing I know related to this is that Android devices sometimes
> have a bug where you have to run a shell command on them to get
> tethering working (I did on mine), but clearly that's not the problem
> you're having seeing as general internet access is working.

I don't have a problem with normal internetty things.

> Ignoring the ping, can you connect to the VPN server through the router?

How would I do that?  At the moment, I have no certainty that the generation 
of the Cert pack is working correctly and the WAN Address of the Home Router 
is wrapped up in that.  I have set up Port Forwarding on the Router with the 
specified ports but nothing shows up in the log when I try to connect.

However.  I have seen entries being forwarded to the VPN Server's IP Address 
when I wasn't actually trying to connect.  I'm assuming that they came from 
some kind of port scanner that knows which ports to look out for.  It wouldn't 
have done them any good, because the server wasn't running at the time.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Hamish McIntyre-Bhatty
The only thing I know related to this is that Android devices sometimes
have a bug where you have to run a shell command on them to get
tethering working (I did on mine), but clearly that's not the problem
you're having seeing as general internet access is working.

Ignoring the ping, can you connect to the VPN server through the router?

Hamish



signature.asc
Description: OpenPGP digital signature
-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Terry Coles
On Saturday, 20 June 2020 13:12:42 BST PeterMerchant wrote:
> I don't know who 8.8.8.8 is,

That is one of Google's DNS Servers.

> but can you 'ping google.com' or nasa.com?

Yes and yes.  Actually pinging the Fully Qualified Domain name of the site, 
simply shows that the DNS Server is accessible as well as the IP Address that 
it resolves to.

Pinging 8.8.8.8 directly cuts out the middle man.


-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread PeterMerchant

On 20/06/2020 10:53, Terry Coles wrote:

Hi,

I've got something going on that I don't under stand (this is normal I hear
you saying).

I'm trying to test my Raspberry Pi VPN Server which is currently installed in
my workroom.  It has Internet access on one side via my Home Router and access
to my Pi network on the other.  I have successfully tested this setup from
inside my home network using the IP Address of the server in the Cert
settings, so I know the system basically works.

So now I need to test it from outside my home network and to do this I have
set up my Android phone as a hotspot and connected my Kubuntu laptop to it.
Unfortunately, I can't get the connection to work (I have changed the settings
to point at my Home Router's WAN address instead of the servers IP Address on
the home network.

When I connect to the hotspot I can:
1.  Browse the web.

2. Read back my public IP Address by typing what is my IP Address in Google.

3. Ping 8.8.8.8.

However, I can't ping my Home Router's WAN address.  if I disable the hotspot,
I can ping it successfully from my Android phone.

What am I missing here?  As far as I can see there is nothing in the Router's
config to make it reject ping requests (or connections) from certain sources,
although it perhaps does that by default and I'm chasing the wrong issue.


I don't know who 8.8.8.8 is,

but can you 'ping google.com' or nasa.com?

P.


--
 Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Terry Coles
On Saturday, 20 June 2020 11:04:30 BST Terry Coles wrote:
> I don't know why but I can no longer ping the Home Router from my Android
> Phone.  I was sure that it had worked earlier, but must have been mistaken.

Ignore this.  I had still got tethering enabled. 

If I disable tethering, but don't connect to my home WiFi, I can ping my Home 
Router's WAN Address.

So why can't I do it from the tethered laptop?

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Internet Access Using Tethering

2020-06-20 Thread Terry Coles
On Saturday, 20 June 2020 10:53:14 BST Terry Coles wrote:
> However, I can't ping my Home Router's WAN address.  if I disable the
> hotspot, I can ping it successfully from my Android phone.

I don't know why but I can no longer ping the Home Router from my Android 
Phone.  I was sure that it had worked earlier, but must have been mistaken.

Also I've just stumbled across a posting in an ISPs forum from a user who had 
the same problem abd was told that Routers normally reject pings.

So the question becomes, how can I check that my Router is receiving the 
packets (or the VPN Server is sending them to the right place).  I know I 
could install wireshark, but is there a quicker/simpler way?

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] Internet Access Using Tethering

2020-06-20 Thread Terry Coles
Hi,

I've got something going on that I don't under stand (this is normal I hear 
you saying).

I'm trying to test my Raspberry Pi VPN Server which is currently installed in 
my workroom.  It has Internet access on one side via my Home Router and access 
to my Pi network on the other.  I have successfully tested this setup from 
inside my home network using the IP Address of the server in the Cert 
settings, so I know the system basically works.

So now I need to test it from outside my home network and to do this I have 
set up my Android phone as a hotspot and connected my Kubuntu laptop to it.  
Unfortunately, I can't get the connection to work (I have changed the settings 
to point at my Home Router's WAN address instead of the servers IP Address on 
the home network.

When I connect to the hotspot I can:
1.  Browse the web.

2. Read back my public IP Address by typing what is my IP Address in Google.

3. Ping 8.8.8.8.

However, I can't ping my Home Router's WAN address.  if I disable the hotspot, 
I can ping it successfully from my Android phone.

What am I missing here?  As far as I can see there is nothing in the Router's 
config to make it reject ping requests (or connections) from certain sources, 
although it perhaps does that by default and I'm chasing the wrong issue.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-07-07 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk