[SOLVED]PPTP VPN connection to server

[SOLVED]PPTP VPN connection to server

Postby mackowiakp » Jun 18th, '15, 18:03

I have to connect from home LAN to PPTP VPN server. It is possible when I am using Android based phone with PPTP client build in. The phone is connected to my home LAN over WiFi. That is, using phone it possible to established VPN connection and reach other server located in company LAN.
I need connect my PC too. So I installed pptp-linux RPM from repo (and PPP) and created script for establishing connection:

Code: Select all
#!/bin/bash
pppd pty "pptp company.vpn.server --nolaunchpppd" file /etc/ppp/options.pptp user my_user password my_pass
sleep 5
route add -net 10.55.55.0/24 ppp0


It establish VPN connection to company server and adds necessary route. So results of ifconfig and netstat are below:

Code: Select all
[root@piotr dir_v]# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:24:8C:A5:49:85 
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::224:8cff:fea5:4985/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8879 errors:18 dropped:0 overruns:0 frame:18
          TX packets:8799 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5312799 (5.0 MiB)  TX bytes:1552168 (1.4 MiB)

eth0:0    Link encap:Ethernet  HWaddr 00:24:8C:A5:49:85 
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:183 errors:0 dropped:0 overruns:0 frame:0
          TX packets:183 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:355211 (346.8 KiB)  TX bytes:355211 (346.8 KiB)

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:172.16.16.1  P-t-P:172.16.16.0  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1000  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:118 (118.0 b)  TX bytes:122 (122.0 b)

[root@piotr dir_v]# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0 eth0
10.55.55.0      0.0.0.0         255.255.255.0   U         0 0          0 ppp0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
172.16.16.0     0.0.0.0         255.255.255.255 UH        0 0          0 ppp0
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
213.241.86.154  192.168.0.1     255.255.255.255 UGH       0 0          0 eth0



And content of /etc/ppp/options.pptp file:

Code: Select all
[root@piotr dir_v]# cat /etc/ppp/options.pptp
#
# Lock the port
#
lock

#
# We don't need the tunnel server to authenticate itself
#
noauth

#
# Turn off transmission protocols we know won't be used
#
nobsdcomp
nodeflate

#
# We want MPPE
#
#mppe no40
#mppe no56
#mppe no128
mppe required,stateless

# needed for W2K3 anyway
refuse-eap

#
# We want a sane mtu/mru
#
mtu 1000
mru 1000

#
# Time this thing out of it goes poof
#
lcp-echo-failure 10
lcp-echo-interval 10


but when I try to ping to the server I have to reach, the result is:

Code: Select all
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable
From 172.16.16.1 icmp_seq=1 Destination Host Unreachable


As I wrote, it is possible to do it from my phone connected to the same LAN and it is possible to use DNS local server located in 10.55.55.X LAN

What I am doing wrong?
Last edited by mackowiakp on Jun 22nd, '15, 18:42, edited 1 time in total.
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: PPTP VPN connection to server

Postby mackowiakp » Jun 19th, '15, 18:24

I try with OpenVPN client. The result was the same. But I try on another Mageia based computer, connected to the same home LAN. And it works without problems! Both PPTP and OpenVPN !
As I remember, several days ago I try to install Network Manager. But I removed it. So maybe tis operation corupt my IP stck. How can I repair ones? Any idea what to check?
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland

Re: PPTP VPN connection to server

Postby wintpe » Jun 22nd, '15, 14:32

go to firewall rules, and disable firewall

try again.

if it works re-enable firewall and when it askes to include your ppp0 device accept it

same happens with tun0 and openvpn on first setup

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: PPTP VPN connection to server

Postby mackowiakp » Jun 22nd, '15, 18:42

YEP !!! THX !! It was firewall problem. Strange is that on others computers I had no such problems.
Nevertheless - SOLVED
Linux is like wigwam. No Windows, no Gates but Apache inside

WARNING ! The administrator has the right to refuse to install WINDOWS, invoking the conscience clause
mackowiakp
 
Posts: 660
Joined: May 23rd, '13, 07:32
Location: Gdynia, Poland


Return to Networking

Who is online

Users browsing this forum: Google Adsense [Bot] and 1 guest

cron