Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
VPN connection [SOLVED (mostly)]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
daniel1988
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2005
Posts: 88
Location: Serbia

PostPosted: Mon Aug 14, 2006 11:23 pm    Post subject: VPN connection [SOLVED (mostly)] Reply with quote

Today I decided to change my ISP (ping, download limit & other stuff made me do so). Connection type: 2.4GHz Wireless
New ISP requires dialing the connection, with other words, making a vpn after connecting to it's AP. I can access the new AP without problems and aquire adresses from DHCP server. The problem is making vpn connection (and sharing it from wlan0 throught eth0).
Things in windows look like this: (yes, yes, I had to install windoz after 6 months of being gentoo linux only :() Link
and this: (part of ipconfig /all from cmd)
Code:
Ethernet adapter Wireless Network Connection:

        Connection-specific DNS Suffix  . : centurion.co.yu
        Description . . . . . . . . . . . : IEEE 802.11b Wireless Cardbus/PCI Ad
apter
        Physical Address. . . . . . . . . : 00-40-F4-9E-0D-F3
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 172.16.0.18
        Subnet Mask . . . . . . . . . . . : 255.255.192.0
        Default Gateway . . . . . . . . . : 172.16.0.1
        DHCP Server . . . . . . . . . . . : 192.168.37.1
        DNS Servers . . . . . . . . . . . : 192.168.200.6
        Lease Obtained. . . . . . . . . . : Monday, August 14, 2006 10:06:58 PM
        Lease Expires . . . . . . . . . . : Tuesday, January 19, 2038 5:14:07 AM


Ethernet adapter Local Area Connection:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : VIA Rhine III Fast Ethernet Adapter
        Physical Address. . . . . . . . . : 00-05-5D-7B-BF-59
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 192.168.0.1
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . :

PPP adapter centa:

        Connection-specific DNS Suffix  . :
        Description . . . . . . . . . . . : WAN (PPP/SLIP) Interface
        Physical Address. . . . . . . . . : 00-53-45-00-00-00
        Dhcp Enabled. . . . . . . . . . . : No
        IP Address. . . . . . . . . . . . : 195.252.74.75
        Subnet Mask . . . . . . . . . . . : 255.255.255.255
        Default Gateway . . . . . . . . . : 195.252.74.75
        DNS Servers . . . . . . . . . . . : 192.168.200.6
                                            192.168.200.9


How can I solve my problem? Which program and which howto should I read (if possible, give me the right commands I need to type, RTFMing is not the best idea while someone is stuck on windoz)

TIA,
Daniel


Last edited by daniel1988 on Sat Aug 26, 2006 6:55 pm; edited 2 times in total
Back to top
View user's profile Send private message
Kruegi
Guru
Guru


Joined: 09 Feb 2005
Posts: 406
Location: Clausthal-Zellerfeld; DE

PostPosted: Tue Aug 15, 2006 12:36 am    Post subject: Reply with quote

Have a look at: http://pptpclient.sourceforge.net/howto-gentoo.phtml

Thomas
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Tue Aug 15, 2006 5:40 am    Post subject: Reply with quote

alternatively have a look at Gentoo-wiki PPTP-client
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
daniel1988
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2005
Posts: 88
Location: Serbia

PostPosted: Tue Aug 22, 2006 7:21 pm    Post subject: Reply with quote

Thanks for pointing me in the right way & sorry for replaying so late...(I had to do some work more important than this vpn tunnel)
Eventually I found some time to dedicate to this thing.

After following both guides (combinig them "in the right way"), still can't connect. Here is the output after issuing debug command:
Code:
gentoo daniel1988 # pon centurion debug dump logfd 2 nodetach
pppd options in effect:
debug           # (from command line)
nodetach                # (from command line)
logfd 2         # (from command line)
dump            # (from command line)
noauth          # (from /etc/ppp/options.centurion)
name manesku            # (from /etc/ppp/peers/centurion)
remotename centurion            # (from /etc/ppp/peers/centurion)
                # (from /etc/ppp/options.centurion)
pty pptp vpn1.centurion.co.yu --nolaunchpppd            # (from /etc/ppp/peers/centurion)
mru 1000                # (from /etc/ppp/options.centurion)
mtu 1000                # (from /etc/ppp/options.centurion)
lcp-echo-failure 10             # (from /etc/ppp/options.centurion)
lcp-echo-interval 10            # (from /etc/ppp/options.centurion)
ipparam centurion               # (from /etc/ppp/peers/centurion)
nobsdcomp               # (from /etc/ppp/options.centurion)
nodeflate               # (from /etc/ppp/options.centurion)
using channel 70
Using interface ppp0
Connect: ppp0 <--> /dev/pts/5
sent [LCP ConfReq id=0x1 <mru 1000> <asyncmap 0x0> <magic 0x768f0c3c> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <mru 1400> <asyncmap 0x0> <auth pap> <magic 0xae4b4834> <pcomp> <accomp>]
sent [LCP ConfNak id=0x1 <auth eap>]
rcvd [LCP ConfAck id=0x1 <mru 1000> <asyncmap 0x0> <magic 0x768f0c3c> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x2 <mru 1400> <asyncmap 0x0> <magic 0xae4b4834> <pcomp> <accomp>]
sent [LCP ConfAck id=0x2 <mru 1400> <asyncmap 0x0> <magic 0xae4b4834> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0x768f0c3c]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 192.168.0.1>]
rcvd [LCP EchoReq id=0x0 magic=0xae4b4834]
sent [LCP EchoRep id=0x0 magic=0x768f0c3c]
rcvd [LCP TermReq id=0x3 "peer refused to authenticate"]
LCP terminated by peer (peer refused to authenticate)
sent [LCP TermAck id=0x3]
Script pptp vpn1.centurion.co.yu --nolaunchpppd finished (pid 19796), status = 0x0
Modem hangup
Connection terminated.

Later I will post config files (need to reboot the machine two times... don't have enought time now).
I looked over Diagnosis HOWTO and, from the first sight, I couldn't find the right solution :(. (That helped me a little... at the very beginning, no rcvd packets were received... "issuing /etc/init.d/iptables stop" helped, then I got the log posted above)

Regards,
Daniel
Back to top
View user's profile Send private message
daniel1988
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2005
Posts: 88
Location: Serbia

PostPosted: Wed Aug 23, 2006 5:31 pm    Post subject: Reply with quote

Here we go

Config files:
Code:
$ grep -v ^# /etc/ppp/options.pptp | grep -v ^$
lock
noauth
nobsdcomp
nodeflate


Code:
# grep -v ^# /etc/ppp/chap-secrets | grep -v ^$
manesku centurion manesk *

Username: manesku
VPNNAME: centurion
Password: manesk (I'm preety sure that I am the only Gentooist in my town, no one could steal my pass)

Code:
# grep -v ^# /etc/ppp/peers/centurion | grep -v ^$
pty "pptp vpn1.centurion.co.yu --nolaunchpppd"
name manesku
remotename centurion
file /etc/ppp/options.centurion
ipparam centurion


The situation is the same even if require-pap is added in config
Code:
# cat /etc/ppp/peers/centurion
pty "pptp vpn1.centurion.co.yu --nolaunchpppd"
name manesku
require-pap
remotename centurion
file /etc/ppp/options.centurion
ipparam centurion


Code:
$ cat /etc/conf.d/net
iface_eth0="192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0"
essid_wlan0="centurion"
config_centurion=( "dhcp" )

config_ppp0=( "ppp" )
pppd_ppp0=(
 "persist"
 "call centurion"
 "holdoff 10"
 "mru 1460"
 "mtu 1460"
 "idle 600"
)
link_ppp0="pty \|pptp vpn1.centurion.co.yu --nolaunchpppd\""


Code:
# ifconfig -v
eth0      Link encap:Ethernet  HWaddr 00:05:5D:7B:BF:59 
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12458 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3948 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8143019 (7.7 Mb)  TX bytes:363457 (354.9 Kb)
          Interrupt:11 Base address:0xe000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:800 (800.0 b)  TX bytes:800 (800.0 b)

wlan0     Link encap:Ethernet  HWaddr 00:40:F4:9E:0D:F3 
          inet addr:172.16.0.18  Bcast:172.16.63.255  Mask:255.255.192.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1550 errors:1 dropped:3 overruns:0 frame:0
          TX packets:7339 errors:17 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:123031 (120.1 Kb)  TX bytes:478606 (467.3 Kb)
          Interrupt:10 Memory:e081a000-e081a100


I can access DNS server as could be seen below
Code:
$ ping www.google.com
PING www.l.google.com (66.249.85.104) 56(84) bytes of data.

--- www.l.google.com ping statistics ---
13 packets transmitted, 0 received, 100% packet loss, time 12009ms

It looks like authentication server comes after DNS server. (aquiring google's IP works as well in windows while connection isn't been established)


And now, testing the connection:
Code:
# pon centurion debug dump logfd 2 nodetach
pppd options in effect:
debug           # (from command line)
nodetach                # (from command line)
logfd 2         # (from command line)
dump            # (from command line)
noauth          # (from /etc/ppp/options.centurion)
name manesku            # (from /etc/ppp/peers/centurion)
remotename centurion            # (from /etc/ppp/peers/centurion)
                # (from /etc/ppp/options.centurion)
pty pptp vpn1.centurion.co.yu --nolaunchpppd            # (from /etc/ppp/peers/centurion)
mru 1000                # (from /etc/ppp/options.centurion)
mtu 1000                # (from /etc/ppp/options.centurion)
lcp-echo-failure 10             # (from /etc/ppp/options.centurion)
lcp-echo-interval 10            # (from /etc/ppp/options.centurion)
ipparam centurion               # (from /etc/ppp/peers/centurion)
nobsdcomp               # (from /etc/ppp/options.centurion)
nodeflate               # (from /etc/ppp/options.centurion)
using channel 20
Using interface ppp0
Connect: ppp0 <--> /dev/pts/5
sent [LCP ConfReq id=0x1 <mru 1000> <asyncmap 0x0> <magic 0x792e277a> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x1 <mru 1400> <asyncmap 0x0> <auth pap> <magic 0x7ea1bf63> <pcomp> <accomp>]
sent [LCP ConfNak id=0x1 <auth eap>]
rcvd [LCP ConfAck id=0x1 <mru 1000> <asyncmap 0x0> <magic 0x792e277a> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x2 <mru 1400> <asyncmap 0x0> <magic 0x7ea1bf63> <pcomp> <accomp>]
sent [LCP ConfAck id=0x2 <mru 1400> <asyncmap 0x0> <magic 0x7ea1bf63> <pcomp> <accomp>]
sent [LCP EchoReq id=0x0 magic=0x792e277a]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 192.168.0.1>]
rcvd [LCP EchoReq id=0x0 magic=0x7ea1bf63]
sent [LCP EchoRep id=0x0 magic=0x792e277a]
rcvd [LCP TermReq id=0x3 "peer refused to authenticate"]
LCP terminated by peer (peer refused to authenticate)
sent [LCP TermAck id=0x3]
Script pptp vpn1.centurion.co.yu --nolaunchpppd finished (pid 630), status = 0x0
Modem hangup
Connection terminated.



One line in last code looks weird to me: sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 192.168.0.1>]
Why 192.168.0.1? That's the IP of the eth0 device, not of the wlan0. Just to mention, after issuing # ifconfig wlan0 down it complains that it could not access vpn1.centurion.co.yu .


Help needed 8O

Regards,
Daniel
Back to top
View user's profile Send private message
daniel1988
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2005
Posts: 88
Location: Serbia

PostPosted: Fri Aug 25, 2006 3:56 pm    Post subject: Reply with quote

Don't ask me why, but it works now 8) Just to set up routing and I am "on the horse" again.
Problem solved "unsuccessful" try to set up the vpn tunnel using pptpconfig. Next time the tunnel was started from the cmd, it worked 8O :roll:
I will post configs one more time here, can't see the real difference...

EDIT: ping doesn't work (after DNS server). How to make it use ppp0 as default gateway?
route add -net 192.168.0.0 netmask 255.255.255.0 dev ppp0
isn't doing that...
Code:
gentoo daniel1988 # ifconfig
eth0      Link encap:Ethernet  HWaddr 00:05:5D:7B:BF:59 
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:675 errors:0 dropped:0 overruns:0 frame:0
          TX packets:664 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:150762 (147.2 Kb)  TX bytes:86111 (84.0 Kb)
          Interrupt:11 Base address:0xe000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:121 errors:0 dropped:0 overruns:0 frame:0
          TX packets:121 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:12377 (12.0 Kb)  TX bytes:12377 (12.0 Kb)

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:195.252.xxx.xxx  P-t-P:192.168.201.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1000  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:62 (62.0 b)  TX bytes:68 (68.0 b)

wlan0     Link encap:Ethernet  HWaddr 00:40:F4:9E:0D:F3 
          inet addr:172.16.xxx.xxx  Bcast:172.16.63.255  Mask:255.255.192.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1593 errors:1 dropped:25 overruns:0 frame:0
          TX packets:2292 errors:7 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:135495 (132.3 Kb)  TX bytes:201214 (196.4 Kb)
          Interrupt:10 Memory:e081a000-e081a100
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum