ArchLinux下命令行连接PPTP VPN实战技术
使用 Gnome 主题的网络连接配置添加 PPTP VPN 连接,一直不能连接上服务器,查看日志找问题也找不出问题。也许是 UI 配置太过于复杂,很多配置项弄的人晕头转向,也许是配置错误的问题吧,于是尝试使用命令行来配置连接。下面是在 ArchLinux 上的操作记录。
➜ ~ sudo pacman -S pptpclient // 推荐使用 pptpsetup 来配置 ➜ ~ sudo pptpsetup --create may --server vpn.domain.com --username may --password 123456 --encrypt ➜ ~ sudo pon may debug dump logfd 2 nodetach ➜ ~ ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 64:00:6a:57:7a:34 brd ff:ff:ff:ff:ff:ff inet 192.168.162.21/24 brd 192.168.162.255 scope global dynamic eno1 valid_lft 688022sec preferred_lft 688022sec inet 192.168.162.101/24 brd 192.168.162.255 scope global secondary eno1 valid_lft forever preferred_lft forever inet6 fe80::6600:6aff:fe57:7a34/64 scope link valid_lft forever preferred_lft forever ➜ ~ ping www.google.com PING www.google.com (216.58.221.132) 56(84) bytes of data. ^C --- www.google.com ping statistics --- 7 packets transmitted, 0 received, 100% packet loss, time 6007ms ➜ ~ sudo pon lml ➜ ~ ip addr 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 link/ether 64:00:6a:57:7a:34 brd ff:ff:ff:ff:ff:ff inet 192.168.162.21/24 brd 192.168.162.255 scope global dynamic eno1 valid_lft 687988sec preferred_lft 687988sec inet 192.168.162.101/24 brd 192.168.162.255 scope global secondary eno1 valid_lft forever preferred_lft forever inet6 fe80::6600:6aff:fe57:7a34/64 scope link valid_lft forever preferred_lft forever 41: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1496 qdisc fq_codel state UNKNOWN group default qlen 3 link/ppp inet 10.10.0.5 peer 10.10.0.1/32 scope global ppp0 valid_lft forever preferred_lft forever ➜ ~ ping www.google.com PING www.google.com (216.58.221.132) 56(84) bytes of data. ^C --- www.google.com ping statistics --- 6 packets transmitted, 0 received, 100% packet loss, time 5007ms ➜ ~ sudo ip route add default dev ppp0 ➜ ~ ping www.google.com PING www.google.com (216.58.221.132) 56(84) bytes of data. 64 bytes from hkg07s02-in-f132.1e100.net (216.58.221.132): icmp_seq=1 ttl=52 time=752 ms 64 bytes from hkg07s02-in-f132.1e100.net (216.58.221.132): icmp_seq=2 ttl=52 time=449 ms 64 bytes from hkg07s02-in-f132.1e100.net (216.58.221.132): icmp_seq=3 ttl=52 time=453 ms 64 bytes from hkg07s02-in-f132.1e100.net (216.58.221.132): icmp_seq=4 ttl=52 time=988 ms 64 bytes from hkg07s02-in-f132.1e100.net (216.58.221.132): icmp_seq=6 ttl=52 time=465 ms ^C --- www.google.com ping statistics --- 7 packets transmitted, 5 received, 28% packet loss, time 6006ms rtt min/avg/max/mdev = 449.059/621.896/988.647/216.446 ms
相关文章
暂无