How to set up a vpn? (Solved)

Using applications, configuring, problems
Message
Author
morochos
Posts: 68
Joined: Wed 28 Aug 2013, 02:55

How to set up a vpn? (Solved)

#1 Post by morochos »

Please someone can explian the steps to configure a vpn with puppy linux? (for artful or xenial). I have tried with openvpn and gpptp, but it's very complicated to me

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

Re: How to set up a vpn?

#2 Post by jafadmin »

morochos wrote:Please someone can explian the steps to configure a vpn with puppy linux? (for artful or xenial). I have tried with openvpn and gpptp, but it's very complicated to me
Disclaimer: *** Gpptp is only for making "pptp" VPN connections! **

That said, for Gpptp in Xenial (and probably the others) to work, you need to do two things:
1) go to /bin and right-click on busybox then select "Link". Name the new link "ip".
2) open /etc/ppp/options.pptp and uncomment line 51: "require-mppe-128" and save.

Now start Gpptp and fill in the info and you should connect ok. There is a "readme.odt" in /etc/ppp/gpptp that should help

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#3 Post by OscarTalks »

For openvpn you just need the configuration file from your chosen VPN provider.
This is usually named as .ovpn (eg "configfile.ovpn")
Start openvpn and point it to the config file
openvpn --config /etc/configfile.ovpn (if you have put the file in /etc)
enter the username and password when prompted.
To exit VPN just do killall openvpn

In my experimental StretchPup remaster I have gadmin openvpn client which is a GUI for openvpn, but I find it a little fiddly to use.

I also have a simple implementation for VPNbook which is free (and I find it to be pretty good).
I have menu entries for VPN Start and VPN Stop which I just click.
A browser opens to confirm the IP address after clicking.
They change the password a couple of times a month.
I grab it from vpnbook.com and paste it into my file at /etc/vpnpass
I can also switch between their servers by changing one symlink in /etc
Attachments
vpn-activator-menu.jpg
A couple of small scripts plus .desktop files give an easy way of activating and deactivating VPN
(73.9 KiB) Downloaded 1347 times
Last edited by OscarTalks on Fri 23 Mar 2018, 16:23, edited 1 time in total.
Oscar in England
Image

morochos
Posts: 68
Joined: Wed 28 Aug 2013, 02:55

#4 Post by morochos »

Thanks for your responses

morochos
Posts: 68
Joined: Wed 28 Aug 2013, 02:55

#5 Post by morochos »

when trying with gpptp, I receive the following:
Attachments
gpptp.png
(24.53 KiB) Downloaded 1450 times

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#6 Post by jafadmin »

@morochos

Post the output from your ifconfig -a command.

It thinks something is not right with your network settings.

morochos
Posts: 68
Joined: Wed 28 Aug 2013, 02:55

#7 Post by morochos »

This:
Attachments
2.png
(54.46 KiB) Downloaded 1384 times

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#8 Post by jafadmin »

@morochos

Yeah, I'm suspicious of that network setup. Is it set up via static, or DHCP?

It is probably breaking on the /16 configuration.

Your ip address, netmask, bcast address, and gateway all need to fit the same class configuration. Not all apps will accept a 192.168/16 configuration because it is one of the non-routable RFC 1918 networks and it expects the 192.168.0/24 configuration instead.

As a reference, boot your PC on a standard /24 class C network (ex: 192.168.168.0 - 255.255.255.0) and use DHCP. My guess is the problem will disappear.

Edit: More info about RFC 1918 networks

" The Internet Assigned Numbers Authority (IANA) has reserved the
following three blocks of the IP address space for private internets:

10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

We will refer to the first block as "24-bit block", the second as
"20-bit block", and to the third as "16-bit" block. Note that (in
pre-CIDR notation) the first block is nothing but a single class A
network number, while the second block is a set of 16 contiguous
class B network numbers, and third block is a set of 256 contiguous
class C network numbers
."

Some apps/devices don't support using the third set in a non-prescribed manner. In other words, it expects a class C network (like my example above).

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#9 Post by jafadmin »

I'm testing this problem on a usb booted ISO: "Xenialpup64-7.5-uefi.iso"

On a 192.168.1.0/24 network and gateway to .1 on that network

(Addr: 192.158.1.101 mask: 255.255.255.0 GW: 192.168.1.1)

Using my PIA VPN account.

Please remember that Gpptp is just a front-end for the 'pppd' and 'pptp' standard linux apps. This issue has to do with the behavior of those apps.

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#10 Post by OscarTalks »

For anyone who wants to try my simple but effective method (and maybe suggest improvements) I have posted about it in the How To section here:-
http://murga-linux.com/puppy/viewtopic.php?t=113004
Oscar in England
Image

morochos
Posts: 68
Joined: Wed 28 Aug 2013, 02:55

#11 Post by morochos »

Sorry, Oscar, but it's not working for me

morochos
Posts: 68
Joined: Wed 28 Aug 2013, 02:55

#12 Post by morochos »

It says it's running, but my ip is the same as before starting the vpn

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#13 Post by jafadmin »

morochos wrote:It says it's running, but my ip is the same as before starting the vpn
Hmm .. that ain't right. Maybe try "disconnect", then "connect" again? Also,
try it without the "mykey" thingy until the bugs are squished ..

There is a CL util called 'myip' that shows your public ip.

does it show in ifconfig?
Attachments
Xenial.png
(79.29 KiB) Downloaded 154 times

morochos
Posts: 68
Joined: Wed 28 Aug 2013, 02:55

#14 Post by morochos »

jafadmin wrote:
morochos wrote:It says it's running, but my ip is the same as before starting the vpn
Hmm .. that ain't right. Maybe try "disconnect", then "connect" again? Also,
try it without the "mykey" thingy until the bugs are squished ..

There is a CL util called 'myip' that shows your public ip.

does it show in ifconfig?
Nothing, I have the same ip
Attachments
3.png
(23.91 KiB) Downloaded 1207 times

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#15 Post by jafadmin »

Until you get rid of that "RTNETLINK" error, it won't connect to anything. It doesn't like your network config. You are running a Class C address space as a Class B network.


Also I found if you have too many failed connection attempts, VPNBook will refuse to handshake with you.
Last edited by jafadmin on Fri 23 Mar 2018, 21:45, edited 1 time in total.

morochos
Posts: 68
Joined: Wed 28 Aug 2013, 02:55

#16 Post by morochos »

jafadmin wrote:Until you get rid of that "RTNETLINK" error, it won't connect to anything. It doesn't like your network config. You are running a Class C address space as a Class B network.
But my internet works without vpn

jafadmin
Posts: 1249
Joined: Thu 19 Mar 2009, 15:10

#17 Post by jafadmin »

morochos wrote: But my internet works without vpn
Ok

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#18 Post by OscarTalks »

In 32bit Xenial I see that PPM offers openvpn 2.3.10 and drags in a few extra dependencies. Probably would work though.
Latest release of openvpn is 2.4.5
I compiled this from source in 32bit Xenial Puppy and it is uploaded here:-
http://smokey01.com/OscarTalks
Download the .pet and click on it to install.
If this is used and the password is correctly pasted in I believe it should work.
I suppose it is possible that other people's ISP and network setup is different from mine.
Artful Puppy is in development but it should be possible to get it compiled and working in the same way (or use the PPM version).
Oscar in England
Image

morochos
Posts: 68
Joined: Wed 28 Aug 2013, 02:55

#19 Post by morochos »

OscarTalks wrote:In 32bit Xenial I see that PPM offers openvpn 2.3.10 and drags in a few extra dependencies. Probably would work though.
Latest release of openvpn is 2.4.5
I compiled this from source in 32bit Xenial Puppy and it is uploaded here:-
http://smokey01.com/OscarTalks
Download the .pet and click on it to install.
If this is used and the password is correctly pasted in I believe it should work.
I suppose it is possible that other people's ISP and network setup is different from mine.
Artful Puppy is in development but it should be possible to get it compiled and working in the same way (or use the PPM version).
It didn't work, Oscar. I don't know what is happening. But thanks for your help

User avatar
OscarTalks
Posts: 2196
Joined: Mon 06 Feb 2012, 00:58
Location: London, England

#20 Post by OscarTalks »

What happens if you open a terminal and type?:-

Code: Select all

openvpn --config /etc/vpnconfig
Oscar in England
Image

Post Reply