我正在使用Ubuntu,我试图build立一个到一个Endian服务器,这似乎是基于OpenVPN的VPN连接。
我已经安装openvpn并使用以下命令连接到服务器:
sudo openvpn --client --pull --comp-lzo --nobind --dev tap0 --ca /home/tkn/efw.pem --auth-user-pass --remote vpn.domain.tld 1194
以上是在 Endian-vpn 的FAQ中提出的 。
它似乎工作,因为我得到以下输出:
Mon Aug 24 20:58:00 2009 OpenVPN 2.1_rc11 i486-pc-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] built on Mar 9 2009 Enter Auth Username:tkn Enter Auth Password: Mon Aug 24 20:58:05 2009 WARNING: No server certificate verification method has been enabled. See http://openvpn.net/howto.html#mitm for more info. Mon Aug 24 20:58:05 2009 LZO compression initialized Mon Aug 24 20:58:05 2009 UDPv4 link local: [undef] Mon Aug 24 20:58:05 2009 UDPv4 link remote: 12.34.56.78:1194 Mon Aug 24 20:58:05 2009 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this Mon Aug 24 20:58:05 2009 [127.0.0.1] Peer Connection Initiated with 12.34.56.78:1194 Mon Aug 24 20:58:06 2009 TUN/TAP device tap0 opened Mon Aug 24 20:58:06 2009 /sbin/ifconfig tap0 192.168.10.153 netmask 255.255.255.0 mtu 1500 broadcast 192.168.10.255 Mon Aug 24 20:58:06 2009 Initialization Sequence Completed
但是,如果我打开我的浏览器并访问http://www.whatsmyip.org/ ,我会得到自己的IP–而不是远程networking。 另外,我的networkingpipe理员没有列出tap0设备。 如果我select“编辑连接”,则在那里,但是我无法从主下拉列表中select它。
我错过了什么?
尝试把线
redirect-gateway
在你的OpenVPNconfiguration
你想做什么是无关的VPN。 你需要做的是build立路由,所以你通过VPN。
而且,如果你想伪装你的源IP地址作为主机,你还需要在另一端设置nat路由器。
所以基本上你需要做的是:
然后,路由器应该将客户端路由的所有出站数据包的源地址进行NAT转换,replace它自己的公有IP(伪装)。 然后在入站的数据包上,它应该做相反的事情,数据包应该通过VPN回来。
您缺less默认路由,或者包含您希望通过VPN使用的所有内容的路由。