[SOLVED] How to use openvpn or pptp vpn plugin in NetworkManager?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to use openvpn or pptp vpn plugin in NetworkManager?
I use slackware 14.2 x86_64, released at 2017/02/14.
Here, I found I can not create a openvpn or pptp vpn connection in NetworkManager. Of course I have openvpn and pptp plugins installed for NetworkManager:
Code:
bash-4.4# ls /var/log/packages/openvpn-2.4.0-x86_64-1
/var/log/packages/openvpn-2.4.0-x86_64-1
bash-4.4# ls /var/log/packages/Network*
/var/log/packages/NetworkManager-1.6.0-x86_64-1
/var/log/packages/NetworkManager-openvpn-1.2.4-x86_64-1_SBo
/var/log/packages/NetworkManager-pptp-1.2.0-x86_64-1_SBo
And, error message in the /sys/log/messages:
Code:
Mar 20 12:21:20 darkstar NetworkManager[1150]: <info> [1489983680.7817] audit: op="connection-add" pid=2168 uid=1000 result="fail" reason="No plugin supported adding this connection"
I use a single PPTP connection. I am not a NM guru. Presuming NM is otherwise working okay with wired/wireless connections and rc.inet1.conf is not configured, a default firewall configuration will prevent the connection. Try temporarily disabling the firewall (rc.firewall stop). Another PPTP blocker is the nf_conntrack_pptp kernel module normally is not loaded by default. I have the following in my rc.local:
Code:
if [ "`ps ax | grep /usr/sbin/NetworkManager | grep -v grep`" != "" ]; then
# Using NetworkManager.
if [ "`/sbin/lsmod | grep nf_conntrack_pptp`" = "" ]; then
/sbin/modprobe nf_conntrack_pptp
fi
fi
When I first debugged the PPTP connection I would run tail -f /var/log/messages to watch the output.
After I disabled the firewall and loaded nf_conntrack_pptp NM connected to the PPTP in about 1 second.
I have failed several times trying to configure OpenVPN. I can't help with that.
It's kind of hard to help when you didn't give any information on how you tried to setup your vpn connection in NetworkManager. The easiest way is to import your vpn config file provided to you from your vpn provider and then enter your username and password. You can also manually enter it by looking at the vpn config file.
I use a single PPTP connection. I am not a NM guru. Presuming NM is otherwise working okay with wired/wireless connections and rc.inet1.conf is not configured, a default firewall configuration will prevent the connection. Try temporarily disabling the firewall (rc.firewall stop). Another PPTP blocker is the nf_conntrack_pptp kernel module normally is not loaded by default. I have the following in my rc.local:
Code:
if [ "`ps ax | grep /usr/sbin/NetworkManager | grep -v grep`" != "" ]; then
# Using NetworkManager.
if [ "`/sbin/lsmod | grep nf_conntrack_pptp`" = "" ]; then
/sbin/modprobe nf_conntrack_pptp
fi
fi
When I first debugged the PPTP connection I would run tail -f /var/log/messages to watch the output.
After I disabled the firewall and loaded nf_conntrack_pptp NM connected to the PPTP in about 1 second.
I have failed several times trying to configure OpenVPN. I can't help with that.
Thanks for your help. But, I still got this failure error although I loaded this module for PPTP connection.
What's your slackware version?
It's kind of hard to help when you didn't give any information on how you tried to setup your vpn connection in NetworkManager. The easiest way is to import your vpn config file provided to you from your vpn provider and then enter your username and password. You can also manually enter it by looking at the vpn config file.
Thanks for your reply. Here, for creating a PPTP connection, I do it following the connection creation dialog, only fill the needed gateway, username and password.
Thanks for your reply. Here, for creating a PPTP connection, I do it following the connection creation dialog, only fill the needed gateway, username and password.
It should look like the screenshot and add
Code:
# PPTP
iptables -A OUTPUT -p tcp -m tcp --dport 1723 -m state --state NEW -j ACCEPT
to rc.firewall
Last edited by PROBLEMCHYLD; 07-29-2017 at 08:45 PM.
# PPTP
iptables -A OUTPUT -p tcp -m tcp --dport 1723 -m state --state NEW -j ACCEPT
to rc.firewall
Oh, my issue is not the network problem, just a basic software error. I don't know how and where it check the right plugin.
My error prompt were attached
bash-4.4# ls /var/log/packages/openvpn-2.4.0-x86_64-1
/var/log/packages/openvpn-2.4.0-x86_64-1
bash-4.4# ls /var/log/packages/Network*
/var/log/packages/NetworkManager-1.6.0-x86_64-1
/var/log/packages/NetworkManager-openvpn-1.2.4-x86_64-1_SBo
/var/log/packages/NetworkManager-pptp-1.2.0-x86_64-1_SBo
You need these packages to get VPN working. If you want to use older versions it should be fine. I'm using 14.2 stable with those packages and have no problem connecting.
You need these packages to get VPN working. If you want to use older versions it should be fine. I'm using 14.2 stable with those packages and have no problem connecting.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.