Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output via debug mode is empty #75

Open
zimmnik opened this issue Feb 19, 2018 · 5 comments
Open

Output via debug mode is empty #75

zimmnik opened this issue Feb 19, 2018 · 5 comments
Labels

Comments

@zimmnik
Copy link

zimmnik commented Feb 19, 2018

Hi!
I use Fedora 27. I set up my vpn connection and it works fine. But I want to understand in detail what going on when I start connection.

I read README.md and launched nm-ssh-service in a debug mode

[root@ideapad ~]# /usr/libexec/nm-ssh-service --debug
** Message: nm-ssh-service (version 1.2.7-1.fc27) starting...

Further I started vpn-ssh connection, but debug output still empty.
What I did incorrectly?

@danfruehauf
Copy link
Owner

Not a problem. So if you export your SSH VPN connection, it'll create a bash script. This script, once executed, will do exactly the same as what the plugin does.

But to answer your question, it does the following:

  • As root, starts a ssh connection to the target computer with -o TunnelDevice=1:100 - that asks SSH to open a tunnel device (tun or tap) numbered 1 on the local side and 100 on the server side
  • Once the devices are open, it uses ifconfig to configure IP address, netmask and gateway on the local side - your desktop side
  • The initial SSH command also uses ifconfig on the server side to configure the remote tunnel with a relevant IP address and netmask

Once all of these are in place, we have a successful tunnel and data can be routed.

Does it answer your question?

@danfruehauf
Copy link
Owner

Oh, but as to your question. I think what might have happened is that you already had a nm-ssh-service up and running. So your new one that you spawned was not used. Verify it by running:

$ ps -ef | grep nm-ssh-service

If there are any up, kill them, then start yours and try to start a connection.

@rubenvereecken
Copy link

I had the same issue and found killing the existing service so I could spin up my own with debug enabld had no effect; as soon as I attempted a VPN connection it would spin up a new nm-ssh-service. Actually, originally I had quite a few running all from failed attempts.

@danfruehauf
Copy link
Owner

I had the same issue and found killing the existing service so I could spin up my own with debug enabld had no effect; as soon as I attempted a VPN connection it would spin up a new nm-ssh-service. Actually, originally I had quite a few running all from failed attempts.

I'm afraid you are correct. NM has changed quite a bit since I wrote the README. I'll fix it shortly.

@audetto
Copy link

audetto commented Oct 21, 2019

This is very interesting.
I would like to see the exact script executed: the reason is that I want to add some extra customisation and I would like to start from what nm-ssh does as I would not be able to do any better.

What is the best way to see it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants