加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

Windows openvpn客户端已连接但ip未更改

发布时间:2020-12-13 22:55:53 所属栏目:Windows 来源:网络整理
导读:我有一台运行openvpn服务器的ubuntu机器.当我尝试连接到ubuntu机器时,从另一个网络上的 Windows机器它说连接.我甚至可以ping ubuntu机器的本地ip.但我没有得到公共IP地址.这是计算机的公共IP地址(窗口)保持不变并且不会更改(在cmyip上检查).为什么会发生这种
我有一台运行openvpn服务器的ubuntu机器.当我尝试连接到ubuntu机器时,从另一个网络上的 Windows机器它说连接.我甚至可以ping ubuntu机器的本地ip.但我没有得到公共IP地址.这是计算机的公共IP地址(窗口)保持不变并且不会更改(在cmyip上检查).为什么会发生这种情况,我该如何解决这个问题?

客户端配置:

client

    proto udp

    dev tun

    ca ca.crt

    dh dh2048.pem

    cert client3.crt

    key client3.key

    remote publicip 1194

    cipher DES-CBC

    verb 2

    mute 20

    keepalive 10 120

    comp-lzo

    persist-key

    persist-tun

    float

    resolv-retry infinite

    nobind

服务器配置:

port 1194
proto udp
dev tun0
ca keys/test/ca.crt
cert keys/test/check.crt
key keys/test/check.key
dh keys/test/dh2048.pem
server 10.180.240.0 255.255.240.0
crl-verify keys/test/crl.pem
cipher DES-CBC
user nobody
group nogroup
status servers/VPn1/logs/openvpn-status.log
log-append servers/VPn1/logs/openvpn.log
verb 2
mute 20
max-clients 100
local 192.168.1.101
keepalive 10 120
client-config-dir /etc/openvpn/servers/VPn1/ccd
client-to-client
duplicate-cn
comp-lzo
persist-key
persist-tun
ccd-exclusive
route 10.22.1.0 255.255.255.0
route 10.22.2.0 255.255.255.0
route 10.22.3.0 255.255.255.0
push "route 10.180.0.0 255.255.252.0"
push "route 10.22.1.0 255.255.255.0"
push "route 10.22.2.0 255.255.255.0"
push "route 10.22.3.0 255.255.255.0"
push "dhcp-option DNS 10.180.3.12"

ipconfig / all

Tunnel adapter 6TO4 Adapter:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft 6to4 Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.{}:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #3
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #4
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes

Tunnel adapter isatap.:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Microsoft ISATAP Adapter #5
   Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
   DHCP Enabled. . . . . . . . . . . : No
   Autoconfiguration Enabled . . . . : Yes
如果要将OpenVPN服务器用作网关,则需要将默认路由推送到客户端.

服务器配置:

push "redirect-gateway def1"

http://openvpn.net/index.php/open-source/documentation/howto.html#redirect

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读