I am linux newbie so please help me with this issue:
I need to connect to vpn serwer (PPTP). I am using NetworkManager and a widget for configure/run the connection.
Not the problem: I can connect easilly BUT all the time a have DHCP address assigned automatically even If I put my static VPN IP that I must use for this connection.
My setup:
First tab (PPTP) - VPN IP, user name, NT domain
Second tab (IPv4) - manual method selected, IP (correct) provided, mas, gateway, dns…
THird tab (IPv^) - not used
As I said I can connect but I dont know why I have dynamic IP all the time while there is manual one specified in the setup. For example i use manual IP: 192.168.111.100 but I am assigned 192.168.111.1
OpenSuse12.2
please help… I am already fighting it 2 days
thanks in advance
BTW
From networkmanager log:
Dec 31 16:33:21 pc101aw NetworkManager[631]: CHAP authentication succeeded
Dec 31 16:33:21 pc101aw NetworkManager[631]: MPPE 128-bit stateless compression enabled
Dec 31 16:33:24 pc101aw NetworkManager[631]: local IP address 192.168.111.1
Dec 31 16:33:24 pc101aw NetworkManager[631]: remote IP address XXX
(…)
Dec 31 16:33:24 pc101aw NetworkManager[631]: <info> Tunnel Device: ppp0
Dec 31 16:33:24 pc101aw NetworkManager[631]: <info> Internal IP4 Address: 192.168.111.1
Dec 31 16:33:24 pc101aw NetworkManager[631]: <info> Internal IP4 Prefix: 32
But why the heck 192.168.111.1 when there is different IP in setup…
What is important: I can easilly setup the connecting with this static IP under Win7 so serverside it works and IP is correct…
Are you the administrator for your PPTP server? It might be that the PPTP server is not configured to allow the statically assigned IP perhaps. For example, maybe this applies:
Thanks.
But the problem is that from Windows i can setup connection and it works (static IP). Using Win7 I define VPN connection - I enter VPN address, local IP that I want to have assigned when connected and … voila. It works.
When I switch to suse - no luck, all the time I got IP assigned by DHCP.
So even if there is something weird with the server - when connecting from Win client it works
Unfortunately I am not administrator of this VPN server and I cannot check anything there - I already tried to talk to server admin but they suggested to switch to windows
Below is debug log. What is worrying me - i cannot see any reference to the IP i declared as the one to be used as my local vpn ip.
Especially one line is suspicious:
Jan 3 00:54:17 pc101aw NetworkManager[634]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Jan 3 00:54:17 pc101aw NetworkManager[634]: rcvd [IPCP ConfNak id=0x2 <addr 192.168.111.1> <ms-dns1 192.168.202.44> <ms-dns2 192.168.100.44>]
Shouldn’t it be something like: sent [IPCP ConfReq id=0x2 <addr 192.168.111.XXX> (with IP address that I entered in config) ?
debug log: XXX - VPN gateway:
Jan 3 00:54:08 pc101aw NetworkManager[634]: <info> Starting VPN service 'pptp'...
Jan 3 00:54:08 pc101aw NetworkManager[634]: <info> VPN service 'pptp' started (org.freedesktop.NetworkManager.pptp), PID 15044
Jan 3 00:54:08 pc101aw NetworkManager[634]: <info> VPN service 'pptp' appeared; activating connections
(...)
Jan 3 00:54:14 pc101aw NetworkManager[634]: CHAP authentication succeeded
Jan 3 00:54:14 pc101aw NetworkManager[634]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Jan 3 00:54:14 pc101aw NetworkManager[634]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Jan 3 00:54:14 pc101aw NetworkManager[634]: rcvd [IPCP ConfReq id=0x0 <addr XXX.XXX.XXX.XXX>]
Jan 3 00:54:14 pc101aw NetworkManager[634]: sent [IPCP ConfAck id=0x0 <addr XXX.XXX.XXX.XXX>]
Jan 3 00:54:14 pc101aw NetworkManager[634]: rcvd [CCP ConfReq id=0x0 <mppe +H -M +S +L -D +C>]
Jan 3 00:54:14 pc101aw NetworkManager[634]: sent [CCP ConfRej id=0x0 <mppe +H -M +S +L -D +C>]
Jan 3 00:54:14 pc101aw NetworkManager[634]: rcvd [CCP ConfRej id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Jan 3 00:54:14 pc101aw NetworkManager[634]: sent [CCP ConfReq id=0x2]
Jan 3 00:54:14 pc101aw NetworkManager[634]: rcvd [CCP ConfReq id=0x1]
Jan 3 00:54:14 pc101aw NetworkManager[634]: sent [CCP ConfAck id=0x1]
Jan 3 00:54:14 pc101aw NetworkManager[634]: rcvd [CCP ConfAck id=0x2]
Jan 3 00:54:14 pc101aw NetworkManager[634]: rcvd [CCP TermReq id=0x2]
Jan 3 00:54:14 pc101aw NetworkManager[634]: CCP terminated by peer
Jan 3 00:54:14 pc101aw NetworkManager[634]: sent [CCP TermAck id=0x2]
Jan 3 00:54:14 pc101aw NetworkManager[634]: Compression disabled by peer.
Jan 3 00:54:17 pc101aw NetworkManager[634]: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Jan 3 00:54:17 pc101aw NetworkManager[634]: rcvd [IPCP ConfReq id=0x1 <addr XXX.XXX.XXX.XXX>]
Jan 3 00:54:17 pc101aw NetworkManager[634]: sent [IPCP ConfAck id=0x1 <addr XXX.XXX.XXX.XXX>]
Jan 3 00:54:17 pc101aw NetworkManager[634]: rcvd [IPCP ConfRej id=0x1 <compress VJ 0f 01>]
Jan 3 00:54:17 pc101aw NetworkManager[634]: sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Jan 3 00:54:17 pc101aw NetworkManager[634]: rcvd [IPCP ConfNak id=0x2 <addr 192.168.111.1> <ms-dns1 192.168.202.44> <ms-dns2 192.168.100.44>]
Jan 3 00:54:17 pc101aw NetworkManager[634]: sent [IPCP ConfReq id=0x3 <addr 192.168.111.1> <ms-dns1 192.168.202.44> <ms-dns2 192.168.100.44>]
Jan 3 00:54:17 pc101aw NetworkManager[634]: rcvd [IPCP ConfAck id=0x3 <addr 192.168.111.1> <ms-dns1 192.168.202.44> <ms-dns2 192.168.100.44>]
Jan 3 00:54:17 pc101aw NetworkManager[634]: local IP address 192.168.111.1
Jan 3 00:54:17 pc101aw NetworkManager[634]: remote IP address XXX.XXX.XXX.XXX
Jan 3 00:54:17 pc101aw NetworkManager[634]: primary DNS address 192.168.202.44
Jan 3 00:54:17 pc101aw NetworkManager[634]: secondary DNS address 192.168.100.44
Jan 3 00:54:17 pc101aw NetworkManager[634]: Script /etc/ppp/ip-up started (pid 15059)
Jan 3 00:54:17 pc101aw NetworkManager[634]: <info> VPN connection 'YYYYYYYYYY' (IP Config Get) reply received.
Jan 3 00:54:17 pc101aw NetworkManager[634]: <info> Internal IP4 Address: 192.168.111.1
Jan 3 00:54:17 pc101aw NetworkManager[634]: <info> Internal IP4 Prefix: 32
Jan 3 00:54:17 pc101aw NetworkManager[634]: <info> Internal IP4 Point-to-Point Address: XXX.XXX.XXX.XXX
Jan 3 00:54:17 pc101aw NetworkManager[634]: <info> Maximum Segment Size (MSS): 0
Jan 3 00:54:17 pc101aw NetworkManager[634]: <info> Forbid Default Route: no
Jan 3 00:54:17 pc101aw NetworkManager[634]: <info> Internal IP4 DNS: 192.168.202.44
Jan 3 00:54:17 pc101aw NetworkManager[634]: <info> Internal IP4 DNS: 192.168.100.44
Jan 3 00:54:17 pc101aw NetworkManager[634]: <info> DNS Domain: '(none)'
Jan 3 00:54:17 pc101aw NetworkManager[634]: Script /etc/ppp/ip-up finished (pid 15059), status = 0x0
Jan 3 00:54:18 pc101aw NetworkManager[634]: <info> Clearing nscd hosts cache.
Jan 3 00:54:18 pc101aw NetworkManager[634]: <info> VPN connection ************** (IP Config Get) complete.
Jan 3 00:54:18 pc101aw NetworkManager[634]: <info> Policy set ****************** (ppp0) as default for IPv4 routing and DNS.
Jan 3 00:54:18 pc101aw NetworkManager[634]: <info> VPN plugin state changed: started (4)
Does your VPN client need a static IP for any particular reason?
My test with my VPN connection wouldn’t allow me to assign a static IP either, but I’ assuming that’s down to the server policy. I’ll check with our administrator (to see if this is the case) in the next couple of days.
after a deep searching. i think we cannot add a specific address for ppp0 using pptp on linux. since the vpn server is made with a windows network instruction, the argument for specifying its own spesific address works only in windows os. also the cofiguration of /etc/ppp/ip-up.d/provider scripts fails in changing the ip address of dev ppp0.
when using pptp client to windows vpn server u must deal with dhcp and noway for static ip.
also network-manager-pptp do not have this option. we can not add a manual method for ipv4 in vpn config.
on the otherhand, since windows os can do that, u can install a windows os in a VM and bridge the vpn connection into a virtual host network card. this is the only solution found right now.