我使用 IP 10.0.0.1 设置了一个简单的 VPN
openvpn --mktun --dev tun1
ip link set tun1 up
ip addr add 10.0.0.2/24 dev tun1
我simpletun
在两台机器上运行一个程序,分别是 vpn 服务器和客户端。我在 vpn 客户端上 ping 10.0.0.1,一切正常。
现在我使用我的笔记本电脑作为 VPN 客户端,我尝试过
[root@kitty temp]# ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
^C
--- 10.0.0.1 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
[root@kitty temp]# ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
ping: sendmsg: Operation not permitted
^C
--- 10.0.0.2 ping statistics ---
1 packets transmitted, 0 received, 100% packet loss, time 0ms
但出现错误ping: sendmsg: Operation not permitted
相关信息:
[root@kitty temp]# ip ro
default via 192.168.1.1 dev wlan0 proto static
10.0.0.0/24 dev tun1 proto kernel scope link src 10.0.0.2
128.93.0.0/16 via 128.93.176.116 dev cscotun0 proto none notify
[root@kitty temp]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default neufbox 0.0.0.0 UG 0 0 0 wlan0
10.0.0.0 * 255.255.255.0 U 0 0 0 tun1
128.93.0.0 sop116r.vpn.inr 255.255.0.0 UG 0 0 0 cscotun0
[root@kitty temp]# ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:24:d7:78:71:38 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.96/24 brd 192.168.1.255 scope global wlan0
inet6 fe80::224:d7ff:fe78:7138/64 scope link
valid_lft forever preferred_lft forever
3: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 5c:26:0a:2b:b8:06 brd ff:ff:ff:ff:ff:ff
21: cscotun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1406 qdisc pfifo_fast state UNKNOWN qlen 500
link/none
inet 128.93.176.116/25 brd 128.93.176.127 scope global cscotun0
22: tun1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 100
link/none
inet 10.0.0.2/24 scope global tun1
这里的潜在问题是什么?谢谢!