You are not logged in.

#1 2013-11-30 08:37:29

joepvd
Member
Registered: 2011-10-06
Posts: 31

netctl, systemd and 'external' vpn command

I am trying to use netctl to connect to a vpn (a microsoft vpn). The `pon` command works, but I would like to use netctl  to set up routing, dns, et cetera. I am confused about how netctl and systemd should work together, and I have not found  any documentation where this is explained in a way that I can  follow.

What I did gather, is that netctl delegates vpn connections to systemd. This is the contents of      /etc/systemd/system/myvpn.service:

[Unit]
Description=myvpn connection

[Service]
Type=forking
ExecStart=/usr/bin/pon
PIDFile=/var/run/ppp0.pid

Unclear to me is how I should set up an additional netctl file, and how that one should make use of, or, being used by,  the systemd-file.

Pointers are very much appreciated!

Offline

#2 2013-11-30 14:05:35

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: netctl, systemd and 'external' vpn command

Did you have a look at /etc/netctl/examples/pppoe ? I'd say netctl supports pppoe just fine; and you should use `netctl enable $profile` after creating a config-file

Offline

#3 2013-12-01 11:49:21

joepvd
Member
Registered: 2011-10-06
Posts: 31

Re: netctl, systemd and 'external' vpn command

Could very well be possible that I've been on the wrong track  smile

But I cannot make the pppoe-configuration to work.

* Where would I put the `pon`-command? I have grepped the files of netctl, but the pon-command is not built in... 
* Why would I need to put in username and password? That is already handled by my chaps-secret file, that is pointed to    via the OptionsFile...
* And what should I choose for the Interface? If I give it the name ppp0 (what is being used by pon), netctl complains as follows:

Interface 'ppp0' does not exist

Anyway, here is my current config:

 
$ grep -vE '^(#|$)' /etc/netctl/myvpn 
Description='Example PPPoE connection'
Interface=ppp0
Connection=pppoe
User='myuser'
Password='mypassword'
PPUnit=0
OptionsFile=/etc/ppp/peers/myvpn
IP=dhcp
ConnectionMode='persist'
DefaultRoute=false
UsePeerDNS=false

$ cat /etc/ppp/peers/myvpn
pty "pptp <ip-address> --nolaunchpppd"
name myvpn 
remotename FW-ROADWAR
require-mppe-128
require-mschap
file /etc/ppp/myvpn.options
ipparam myvpn

$ cat /etc/ppp/myvpn.options
lock   
# debug
name vpn
noauth
user myusername
# mppe required,no40,no56
refuse-eap
lcp-echo-failure 30
lcp-echo-interval 20
idle 0
defaultroute
maxfail 1

Offline

Board footer

Powered by FluxBB