linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How to configure Netplan for VPN on boot
@ 2022-05-24  9:28 Andy Barratt
  2022-05-24 18:04 ` James Carlson
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Barratt @ 2022-05-24  9:28 UTC (permalink / raw)
  To: linux-ppp

Hello all,

Thanks for having me.  I’m afraid I’m still somewhat of a novice when it comes to the sysadmin/devops/networking world so please be patient with me if I don’t understand things right away :)

I’ve set up a wee web server at home running Ubuntu 20.04 and a number of docker controllers.  As I am using a 5G modem for internet, IP addresses and port forwarding can be a bit unpredictable so I’ve chosen to hook this server up to a VPN provider to gain a static IP address and open ports directly to the machine.

I’ve successfully managed to set up my peer and all is well.  The only trouble is that I have to manually run `sudo pon purevpn` on each boot.  Whilst I do have a UPS in place, I do want to know that the connection will correct itself if there ever is a need for the box to reboot :)

Now I’ve looked at the documentation by you good folk here: http://pptpclient.sourceforge.net/howto-ubuntu.phtml
but I note that it was last updated 15 years ago (2007) and that it suggests I make some changes to my `/etc/network/interfaces` file.

The trouble lies here.  Ubuntu 20.04 does not, by default, have a `/etc/network/interfaces` file.  It would seem things have been migrated in this new version to something called NetPlan.

I figured I’d take the opportunity to not just google a solution but make sure you good folk were part of that solution so we can hopefully get this documentation updated for other lost souls like myself :)

Hope you are all well,
Andy Barratt

P.S. I note that my first attempt to subscribe failed when I sent a command to confirm my email address.  I guessed (seemingly correctly) that converting to Plain Text emails would solve this problem (Rich Text of course being the default in most clients these days!).  It might be helpful if someone could update the mailing list software to advise future participants to do the same :)

P.P.S. I’ve chosen to use `back ticks` to surround code snippets as this is what I’m used to in systems like markdown, but do let me know if there’re different conventions folk are used to in mailing lists like this.  Despite being born in the late 80s and grown up on dialup, I seem to have somehow missed out on the mailing list phase of the internet! :)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to configure Netplan for VPN on boot
  2022-05-24  9:28 How to configure Netplan for VPN on boot Andy Barratt
@ 2022-05-24 18:04 ` James Carlson
  0 siblings, 0 replies; 2+ messages in thread
From: James Carlson @ 2022-05-24 18:04 UTC (permalink / raw)
  To: Andy Barratt, linux-ppp

On 5/24/22 5:28 AM, Andy Barratt wrote:
> Hello all,
> 
> Thanks for having me.  I’m afraid I’m still somewhat of a novice when it comes to the sysadmin/devops/networking world so please be patient with me if I don’t understand things right away :)
> 
> I’ve set up a wee web server at home running Ubuntu 20.04 and a number of docker controllers.  As I am using a 5G modem for internet, IP addresses and port forwarding can be a bit unpredictable so I’ve chosen to hook this server up to a VPN provider to gain a static IP address and open ports directly to the machine.
> 
> I’ve successfully managed to set up my peer and all is well.  The only trouble is that I have to manually run `sudo pon purevpn` on each boot.  Whilst I do have a UPS in place, I do want to know that the connection will correct itself if there ever is a need for the box to reboot :)

I've never used the Debian pon/poff stuff, and none of my Linux systems 
have it installed, but it looks pretty darned simple. That's just doing 
nothing more than "pppd call purevpn" under the covers. The "pon" script 
is simple enough that I'm not 100% sure why it exists.

To invoke at boot, I would expect it's sufficient to create your own 
start-up script that does the above (either via the old rc scripts or 
through a custom systemd service).

> 
> Now I’ve looked at the documentation by you good folk here: http://pptpclient.sourceforge.net/howto-ubuntu.phtml
> but I note that it was last updated 15 years ago (2007) and that it suggests I make some changes to my `/etc/network/interfaces` file.
> 
> The trouble lies here.  Ubuntu 20.04 does not, by default, have a `/etc/network/interfaces` file.  It would seem things have been migrated in this new version to something called NetPlan.

NetPlan looks anything but simple and I'm not completely sure that it 
supports the construction of PPP links. I suspect it does not.

https://askubuntu.com/questions/987982/how-do-i-use-netplan-to-configure-pppoe
https://askubuntu.com/questions/1060696/ubuntu-18-04-netplan-support-ppp-interface-with-specific-isp-provider

> P.S. I note that my first attempt to subscribe failed when I sent a command to confirm my email address.  I guessed (seemingly correctly) that converting to Plain Text emails would solve this problem (Rich Text of course being the default in most clients these days!).  It might be helpful if someone could update the mailing list software to advise future participants to do the same :)

"Rich Text" would be a strange and cumbersome thing for a widely 
distributed mailing list, I'd think.

> P.P.S. I’ve chosen to use `back ticks` to surround code snippets as this is what I’m used to in systems like markdown, but do let me know if there’re different conventions folk are used to in mailing lists like this.  Despite being born in the late 80s and grown up on dialup, I seem to have somehow missed out on the mailing list phase of the internet! :)

That's fine; it's obvious what was meant. See, if it were Rich Text, I'd 
probably be staring at little square boxes instead of quote marks, as 
whatever weird "smart quoting" was used in the original message wouldn't 
match the client I have. :->

-- 
James Carlson     42.703N 71.076W FN42lq08    <carlsonj@workingcode.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-24 18:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-24  9:28 How to configure Netplan for VPN on boot Andy Barratt
2022-05-24 18:04 ` James Carlson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).