OpenVPN 설정에 문제가 있습니다.
설정 : -> Ubuntu Server 12.04-> 두 개의 활성 NIC : eth0 (기본값) : 192.168.1.0/24 eth1 : xxxx (외부 IP)
eth1 NIC로 외부 세계에 연결할 수 있도록 라우팅이 작동하도록했습니다.
holmen@filserver:~$ ping -I eth1 -c 3 www.linuxquestions.org
PING www.linuxquestions.org (75.126.162.205) from 192.168.1.2 eth1: 56(84) bytes of data.
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_req=1 ttl=50 time=133 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_req=2 ttl=50 time=133 ms
64 bytes from www.linuxquestions.org (75.126.162.205): icmp_req=3 ttl=50 time=133 ms
--- www.linuxquestions.org ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 133.281/133.336/133.379/0.423 ms
One curious thing is that the "from ip #". It says "from 192.168.1.2 eth1" but that ip is the servers ip on the eth0 iface.
Netstat :
holmen@filserver:~$ netstat -anr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
x.x.x.x 0.0.0.0 255.255.128.0 U 0 0 0 eth1
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
그러나 실제 문제는 다음과 같습니다. "local xxxx (eth1 ext ip)"옵션으로 openvpn을 설정할 때 여전히 eth0 인터페이스를 터널링합니다. 그리고 나는 왜 그런지 이해할 수 없습니다.
OpenVPN 설정 :
client
dev tap
proto udp
local x.x.x.x
remote openvpn.anonine.net 1194
remote openvpn.anonine.net 1195
remote openvpn-2.anonine.net 1196
remote openvpn-2.anonine.net 1197
remote openvpn-3.anonine.net 1198
remote openvpn-3.anonine.net 1199
remote openvpn-4.anonine.net 1200
remote openvpn-4.anonine.net 1201
remote-random
resolv-retry infinite
auth-user-pass
persist-key
persist-tun
ca anonine.ca.crt
ns-cert-type server
comp-lzo
reneg-sec 0
verb 3
Netstat (터널 활성) :
holmen@filserver:~$ netstat -anr
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 46.246.20.129 128.0.0.0 UG 0 0 0 tap0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
5.150.128.0 0.0.0.0 255.255.128.0 U 0 0 0 eth1
46.246.20.128 0.0.0.0 255.255.255.128 U 0 0 0 tap0
80.67.8.222 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0
128.0.0.0 46.246.20.129 128.0.0.0 UG 0 0 0 tap0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
누구든지 아이디어가 있습니까?