AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 694957
Accepted
markhorrocks
markhorrocks
Asked: 2015-05-29 02:43:25 +0800 CST2015-05-29 02:43:25 +0800 CST 2015-05-29 02:43:25 +0800 CST

软醚。客户端可以连接,但我无法访问服务器

  • 772

我按照本指南在 Digital Ocean Ubuntu 14.04 实例上设置 Softether VPN 服务器。我在笔记本电脑(ubuntu 14.10)上安装了 Softether vpn 客户端和 openvpn。

服务器日志表明两个客户端都可以正常连接,但我无法 ping 或 telnet 到服务器。另外,当我连接到 openvpn 时,我失去了所有的互联网,除了 Skype。

使用 openvpn 客户端 netstat -nr 报告如下。

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.30.14   128.0.0.0       UG        0 0          0 tun0
0.0.0.0         192.168.4.1     0.0.0.0         UG        0 0          0 eth0
54.158.28.151   192.168.4.1     255.255.255.255 UGH       0 0          0 eth0
128.0.0.0       192.168.30.14   128.0.0.0       UG        0 0          0 tun0
192.168.4.0     0.0.0.0         255.255.252.0   U         0 0          0 eth0
192.168.30.14   0.0.0.0         255.255.255.255 UH        0 0          0 tun0

使用 Softether 客户端,netstat -nr 报告以下内容:

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.4.1     0.0.0.0         UG        0 0          0 eth0
192.168.4.0     0.0.0.0         255.255.252.0   U         0 0          0 eth0

ping 到 telnet 到 192.168.30.14 超时。

Softether vpn 客户端 ifconfig -a 报告以下内容。

vpn_markadapter Link encap:Ethernet HWaddr 00:ac:c5:ff:ce:ec 
 inet6 addr: fe80::2ac:c5ff:feff:ceec/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1620 errors:0 dropped:0 overruns:0 frame:0
TX packets:1234 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:500 
RX bytes:118928 (118.9 KB) TX bytes:104989 (104.9 KB)

openvpn 客户端,ifconfig -a:

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
      inet addr:192.168.30.13  P-t-P:192.168.30.14      Mask:255.255.255.255
      UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
      RX packets:280 errors:0 dropped:0 overruns:0 frame:0
      TX packets:534 errors:0 dropped:0 overruns:0 carrier:0
      collisions:0 txqueuelen:100 
      RX bytes:38199 (38.1 KB)  TX bytes:60461 (60.4 KB)

Openvpn 控制台:

Thu May 28 19:10:12 2015 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu May 28 19:10:12 2015 Socket Buffers: R=[87380->131072] S=[16384->131072]
Thu May 28 19:10:12 2015 Attempting to establish TCP connection with [AF_INET]128.199.126.151:5555 [nonblock]
Thu May 28 19:10:13 2015 TCP connection established with [AF_INET]128.199.126.151:5555
Thu May 28 19:10:13 2015 TCPv4_CLIENT link local: [undef]
Thu May 28 19:10:13 2015 TCPv4_CLIENT link remote: [AF_INET]128.199.126.151:5555
Thu May 28 19:10:13 2015 TLS: Initial packet from [AF_INET]128.199.126.151:5555, sid=16ccbc28 f3c5eca8
Thu May 28 19:10:13 2015 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Thu May 28 19:10:14 2015 VERIFY OK: depth=0, CN=[128.199.126.151], O=[128.199.126.151], OU=[128.199.126.151], C=US
Thu May 28 19:10:14 2015 Data Channel Encrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Thu May 28 19:10:14 2015 Data Channel Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu May 28 19:10:14 2015 Data Channel Decrypt: Cipher 'AES-128-CBC' initialized with 128 bit key
Thu May 28 19:10:14 2015 Data Channel Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu May 28 19:10:14 2015 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 2048 bit RSA
Thu May 28 19:10:14 2015 [[128.199.126.151]] Peer Connection Initiated with [AF_INET]128.199.126.151:5555
Thu May 28 19:10:16 2015 SENT CONTROL [[128.199.126.151]]: 'PUSH_REQUEST' (status=1)
Thu May 28 19:10:16 2015 PUSH: Received control message: 'PUSH_REPLY,ping 3,ping-restart 10,ifconfig 192.168.30.13 192.168.30.14,dhcp-option DNS 192.168.30.1,route-gateway 192.168.30.14,redirect-gateway def1'
Thu May 28 19:10:16 2015 OPTIONS IMPORT: timers and/or timeouts modified
Thu May 28 19:10:16 2015 OPTIONS IMPORT: --ifconfig/up options modified
Thu May 28 19:10:16 2015 OPTIONS IMPORT: route options modified
Thu May 28 19:10:16 2015 OPTIONS IMPORT: route-related options modified
Thu May 28 19:10:16 2015 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Thu May 28 19:10:16 2015 ROUTE_GATEWAY 192.168.4.1/255.255.252.0 IFACE=eth0 HWADDR=b8:ac:6f:50:18:af
Thu May 28 19:10:16 2015 TUN/TAP device tun0 opened
Thu May 28 19:10:16 2015 TUN/TAP TX queue length set to 100
Thu May 28 19:10:16 2015 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Thu May 28 19:10:16 2015 /sbin/ip link set dev tun0 up mtu 1500
Thu May 28 19:10:16 2015 /sbin/ip addr add dev tun0 local 192.168.30.13 peer 192.168.30.14
Thu May 28 19:10:16 2015 /sbin/ip route add 128.199.126.151/32 via 192.168.4.1
Thu May 28 19:10:16 2015 /sbin/ip route add 0.0.0.0/1 via 192.168.30.14
Thu May 28 19:10:16 2015 /sbin/ip route add 128.0.0.0/1 via 192.168.30.14
Thu May 28 19:10:16 2015 Initialization Sequence Completed
ubuntu
  • 3 3 个回答
  • 8643 Views

3 个回答

  • Voted
  1. Juraganet
    2015-06-03T00:19:06+08:002015-06-03T00:19:06+08:00

    如果客户端是linux,则需要在softether启动脚本末尾添加“dhclient tunx”命令。添加睡眠延迟时间也可以确保在启动 dhclient 命令之前已连接 vpn。

    • 1
  2. Juraganet
    2015-05-30T17:35:10+08:002015-05-30T17:35:10+08:00

    你的配置没问题。看起来有什么东西阻止了您的传出流量。我不确定它是什么,可能是防火墙。

    • 0
  3. Best Answer
    markhorrocks
    2015-06-02T05:50:24+08:002015-06-02T05:50:24+08:00

    我需要在服务器上安装 Softether vpnclient,然后在 vpnserver DhcpEnable 中,最后重新启动 SSH。DhcpTable 显示了我连接的 IP 地址。

    在我的笔记本电脑上,我需要在 adpater 上运行 dhclient 以获取 IP 地址。然后我可以 ssh 进入我的服务器。

    • 0

相关问题

  • 无法通过 Ubuntu VPN 访问外部网络

  • ubuntu apt-get upgrade - 如何在 shell 中单击确定?

  • VirtualBox 上 Ubuntu 的访客优化技巧 [关闭]

  • 外部硬盘上的 virtualbox 虚拟硬盘驱动器(Vista 主机上的 ubuntu 客户机)

  • 如何在 Ubuntu 上挂载 LVM 分区?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve