archlinux上的PPTP服务器,KVM VPS,客户端从未收到过包

时间:2015-07-16 09:27:26

标签: linux routing vps archlinux pptp

我试图在DigitalOcean的KVM VPS上设置PPTP服务器。我的配置如下。

/etc/iptables/iptables.rules:

*nat
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT

/etc/pptpd.conf(localip是以下服务器中的服务器IP,45.55.20.125或104.236.158.120):

option /etc/ppp/pptpd-options
logwtmp
localip SERVER_IP
remoteip 10.1.0.1-10

的/ etc / PPP / PPTPD选项:

name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
proxyarp
nodefaultroute
lock
nobsdcomp
novj
novjccomp
nologfd
ms-dns 8.8.8.8
ms-dns 8.8.4.4

/etc/sysctl.conf中:

net.ipv4.ip_forward=1

适用于Debian OS(服务器IP:45.55.20.125)。当我在客户端上ping 8.8.8.8时,信息如下:

root@test:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         45.55.0.1       0.0.0.0         UG    0      0        0 eth0
10.1.0.1        0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
10.134.0.0      0.0.0.0         255.255.0.0     U     0      0        0 eth1
45.55.0.0       0.0.0.0         255.255.224.0   U     0      0        0 eth0

root@test:~# tcpdump -n -i eth0 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
04:37:22.566596 IP 45.55.20.125 > 8.8.8.8: ICMP echo request, id 64781, seq 0, length 64
04:37:22.569073 IP 8.8.8.8 > 45.55.20.125: ICMP echo reply, id 64781, seq 0, length 64
04:37:23.570903 IP 45.55.20.125 > 8.8.8.8: ICMP echo request, id 64781, seq 1, length 64
04:37:23.573515 IP 8.8.8.8 > 45.55.20.125: ICMP echo reply, id 64781, seq 1, length 64
04:37:24.571255 IP 45.55.20.125 > 8.8.8.8: ICMP echo request, id 64781, seq 2, length 64
04:37:24.573913 IP 8.8.8.8 > 45.55.20.125: ICMP echo reply, id 64781, seq 2, length 64

root@test:~# tcpdump -n -i ppp0 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ppp0, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
04:37:22.566558 IP 10.1.0.1 > 8.8.8.8: ICMP echo request, id 64781, seq 0, length 64
04:37:22.569095 IP 8.8.8.8 > 10.1.0.1: ICMP echo reply, id 64781, seq 0, length 64
04:37:23.570871 IP 10.1.0.1 > 8.8.8.8: ICMP echo request, id 64781, seq 1, length 64
04:37:23.573543 IP 8.8.8.8 > 10.1.0.1: ICMP echo reply, id 64781, seq 1, length 64
04:37:24.571224 IP 10.1.0.1 > 8.8.8.8: ICMP echo request, id 64781, seq 2, length 64

但是我用一个digitalocean-debian-to-arch将一个Debian转换成了Archlinux(服务器IP:104.236.158.120)。当我在客户端ping 8.8.8.8时:

> ip route
default via 104.236.128.1 dev eth0  proto static
10.1.0.1 dev ppp0  proto kernel  scope link  src 104.236.158.120
104.236.128.0/18 dev eth0  proto kernel  scope link  src 104.236.158.120

> sudo tcpdump -n -i eth0 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
16:55:28.352582 IP 104.236.158.120 > 8.8.8.8: ICMP echo request, id 51470, seq 10, length 64
16:55:28.354295 IP 8.8.8.8 > 104.236.158.120: ICMP echo reply, id 51470, seq 10, length 64
16:55:29.357393 IP 104.236.158.120 > 8.8.8.8: ICMP echo request, id 51470, seq 11, length 64
16:55:29.359129 IP 8.8.8.8 > 104.236.158.120: ICMP echo reply, id 51470, seq 11, length 64
16:55:30.361901 IP 104.236.158.120 > 8.8.8.8: ICMP echo request, id 51470, seq 12, length 64
16:55:30.363614 IP 8.8.8.8 > 104.236.158.120: ICMP echo reply, id 51470, seq 12, length 64

> sudo tcpdump -n -i ppp0 icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ppp0, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes
16:55:24.338226 IP 10.1.0.1 > 8.8.8.8: ICMP echo request, id 51470, seq 6, length 64
16:55:25.343537 IP 10.1.0.1 > 8.8.8.8: ICMP echo request, id 51470, seq 7, length 64
16:55:26.347889 IP 10.1.0.1 > 8.8.8.8: ICMP echo request, id 51470, seq 8, length 64

没有" 8.8.8.8> 10.1.0.1"包裹,我无法弄清楚为什么。可能是什么问题?

0 个答案:

没有答案