nm-l2tp / NetworkManager-l2tp

L2TP and L2TP/IPsec support for NetworkManager
GNU General Public License v2.0
486 stars 83 forks source link

After changing the IP address of the Gateway, the old one is still used #211

Closed dilyanpalauzov closed 1 year ago

dilyanpalauzov commented 1 year ago

I have setup a VPN connection under Gnome. It worked. Then the IP address of the destination was changed. The DNS entries were updated, all data has expired. The /etc/NetworkManager/xxx.connection now contains

[vpn]
gateway=11.22.33.44

Previously it contained a host name. I restarted my computer several times.

The problem report is that the VPN connection now does not work and syslog contains:

May 11 22:23:26 d pluto[5705]: "146dd70c-b1d5-4926-a2f3-b061534b5ef7" # 5: Peer ID is ID_IPV4_ADDR: '44.55.66.77'

and 44.55.66.77 is the old IP address of the VPN connection. I have no idea how pluto finds this address and how can I remove it, but it is used by pluto.

Please advice how to propagate the changed IP address from the GUI to pluto.

Moreover when I change the Gateway in gnome-control-center the dialog has Cancel and Apply button. I click on Apply the windows is not closed.I click on Cancel window is closed. So what is the way to close the window by saving the changes, without cancelling that changes?

dilyanpalauzov commented 1 year ago

I use Fedora 38. Before the IP address was changed I use Fedora 37. I can neither confirm nor deny that upgrading Fedora 37 → 38 break the things.

dkosovic commented 1 year ago

The Peer ID is what the remote VPN server is reporting as its ID, looks like whoever configured it didn't change its ID after the IP address was changed.

A workaround is to go to the IPsec settings and set the Remote ID to 44.55.66.77.

dkosovic commented 1 year ago

Moreover when I change the Gateway in gnome-control-center the dialog has Cancel and Apply button. I click on Apply the windows is not closed. I click on Cancel window is closed. So what is the way to close the window by saving the changes, without cancelling that changes?

That is the default behaviour of all gnome-control-center VPN editor plug-ins and not just this one, you have to click Apply followed by Cancel to close the window and save the settings. It has no OK button (like other operating systems) which is the equivalent of doing Apply followed by Cancel.

nm-connection-editor has Save (instead of Apply) and Cancel buttons, but also no OK button.

Sorry I don't know why the GNOME Project chose not to use an OK button with NetworkManager GUI dialog boxes.

dilyanpalauzov commented 1 year ago

Thank, the setting the "Remote ID" property indeed helped!

By the way, the window with the "Remove ID” property also has Cancel and Apply buttons. Both buttons close the window.