[Nottingham] How to remote diagnose network issues?

Jason Irwin jasonirwin73 at gmail.com
Mon Sep 7 15:53:58 UTC 2015


On 07/09/15 12:17, Paul wrote:
> I guess I am missing something ?
I do use OpenVPN at home, but it struck me as a bit of a sledgehammer to
crack this nut. Also, the Pi is already on a different VPN for historic
reasons and I didn't want to entire the nightmare of the routing table.
Reverse SSH just seemed like the simple answer when I only want basic
terminal access.

I'm just not clear on why it drops out and AutoSSH doesn't always
reconnect. The link has dropped once again, but I can see an incoming
SSH connection from the RasPi on a new PID. With this: sudo lsof -i -n |
egrep '\<ssh\>'
I see output similar to:
sshd  24738        root  3u  IPv4 2775675  0t0  TCP
192.168.1.2:ssh->123.123.123.123:56285 (ESTABLISHED)
sshd  24828    remotePi  3u  IPv4 2775675  0t0  TCP
192.168.1.2:ssh->123.123.123.123:56285 (ESTABLISHED)
sshd  24932        root  3u  IPv4 2777477  0t0  TCP
192.168.1.2:ssh->192.168.1.3:43241 (ESTABLISHED)
sshd  24981    testUser  3u  IPv4 2777477  0t0  TCP
192.168.1.2:ssh->192.168.1.3:43241 (ESTABLISHED)

Next when I check: sudo netstat -ntlp | grep LISTEN
I get:
tcp    0  0 0.0.0.0:22      0.0.0.0:*  LISTEN      19269/sshd
tcp    0  0 0.0.0.0:15000   0.0.0.0:*  LISTEN      24981/1
tcp6   0  0 :::22           :::*       LISTEN      19269/sshd
tcp6   0  0 :::15000        :::*       LISTEN      24981/1

If I match the PIDs, I can see that my test-user has a reverse tunnel
set-up on port 15000 (which is what I'd expect to see) but there's no
port info for the Pi. It's as if its don't a straight SSH connection
rather than a reverse; and I'm not sure why that would be the case.

I'm not even sure what to look for in the server logs.

-- 
╔═════════════╦══════════════════════════════════════════╗
║ Jason Irwin ║ OpenPGP (GPG/PGP) Public Key: 0xD0C592B1 ║
║             ║ Import from hkp://pgp.mit.edu            ║
╚═════════════╩══════════════════════════════════════════╝



More information about the Nottingham mailing list