首先,抱歉,我的英语水平以及对这个主题的了解不够。
我在德国有一台专用服务器(Windows 2008 R2),我住在西班牙。我想通过德国的服务器从我的家用电脑(Windows 7 Pro x64)访问互联网,这样我就可以使用德国 IP,有时我需要这个。
我可以完全访问这两台计算机,但我不知道从哪里开始。(我的知识仅限于软件开发 :/ )
如果我需要创建 VPN 等等,我想知道从哪里开始。
提前致谢!
更新 1
我尝试了很多 OpenVPN 选项,但遗憾的是我对网络一无所知,所以我不得不接受我不知道自己在做什么 :(
这是我的配置文件(请注意,大多数选项都来自示例配置文件)。
服务器配置文件
#server config file start
port 1194
proto udp
dev tun
server 10.0.0.0 255.255.255.224 #you may choose any subnet. 10.0.0.x is used for this example.
ca "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\server.crt"
key "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\server.key"
dh "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\dh1024.pem"
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
#the following commands are optional
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 5
#config file ends
客户端配置文件
#client config file start
client
dev tun
proto udp
remote 176.9.99.180 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\client1.crt"
key "C:\\Program Files (x86)\\OpenVPN\\easy-rsa\\keys\\client1.key"
ns-cert-type server
comp-lzo
verb 5
explicit-exit-notify 2
ping 10
ping-restart 60
route-method exe
route-delay 2
# end of client config file
以下是服务器的网络设置:
IP 地址:176.9.99.180 子网掩码:255.255.255.224 默认网关:176.9.99.161
首选 DNS 服务器:127.0.0.1
更新 2
这是路由表:
===========================================================================
Interface List
14...00 ff e4 70 31 16 ......TAP-Win32 Adapter V9
11...54 04 a6 7e ee ae ......Realtek PCIe GBE Family Controller
1...........................Software Loopback Interface 1
10...00 00 00 00 00 00 00 e0 Microsoft Teredo Tunneling Adapter
12...00 00 00 00 00 00 00 e0 Microsoft 6to4 Adapter
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 176.9.99.161 176.9.99.180 11
10.0.0.0 255.255.255.224 10.0.0.2 10.0.0.1 30
10.0.0.0 255.255.255.252 On-link 10.0.0.1 286
10.0.0.1 255.255.255.255 On-link 10.0.0.1 286
10.0.0.3 255.255.255.255 On-link 10.0.0.1 286
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
176.9.99.160 255.255.255.224 On-link 176.9.99.180 266
176.9.99.180 255.255.255.255 On-link 176.9.99.180 266
176.9.99.191 255.255.255.255 On-link 176.9.99.180 266
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 10.0.0.1 286
224.0.0.0 240.0.0.0 On-link 176.9.99.180 266
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 10.0.0.1 286
255.255.255.255 255.255.255.255 On-link 176.9.99.180 266
===========================================================================
Persistent Routes:
Network Address Netmask Gateway Address Metric
0.0.0.0 0.0.0.0 176.9.99.161 1
===========================================================================
IPv6 Route Table
===========================================================================
Active Routes:
If Metric Network Destination Gateway
10 58 ::/0 On-link
1 306 ::1/128 On-link
10 58 2001::/32 On-link
10 306 2001:0:5ef5:73b8:ce2:1218:4ff6:9c4b/128
On-link
14 286 fe80::/64 On-link
11 266 fe80::/64 On-link
10 306 fe80::/64 On-link
10 306 fe80::ce2:1218:4ff6:9c4b/128
On-link
14 286 fe80::7c23:a:ec4e:2cfc/128
On-link
11 266 fe80::bd18:6249:9f7d:89a2/128
On-link
1 306 ff00::/8 On-link
10 306 ff00::/8 On-link
14 286 ff00::/8 On-link
11 266 ff00::/8 On-link
===========================================================================
Persistent Routes:
None
答案1
如果您只需要使用德国IP,您可以在服务器上安装/配置代理,并在家用电脑上使用该代理访问互联网。
VPN 也可以完成这项工作,但我认为如果您只需要使用德国 IP 访问互联网,那就太多了。