OpenVPN이있는 Ubuntu 12.04의 DNS 문제 server.key

안내서 에 따라 홈 네트워크에서 openvpn을 설정했습니다.

우연히 우분투 12.10을 실수로 다운로드했으며 눈치 채지 않고 가이드를 따라갔습니다 …

그런 다음 여기 에서 몇 가지 작업을 수행 했습니다 . “redirect-gateway def1″iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

브라우징을 활성화합니다.

OpenVPN이 완전히 작동했습니다.

즉, 외부에서 탐색 할 때 원격으로 접속 (내부 서비스 액세스)하고 IP를 숨길 수있었습니다.

그런 다음 ubuntu 12.04가 필요하다는 것을 알았으므로 새 설치에서 동일한 프로세스를 따랐습니다.

이제 문제는 DNS가 해결되지 않는다는 것입니다.

openvpn을 다운로드하면 resolvconf가 다운로드되어 수동으로 제거하려고 시도했습니다.

내 시스템에서 얻은 것들이 있습니다.

openvpn server.conf :

mode server
tls-server

local 192.168.1.101 ## ip/hostname of server
port 80 ## default openvpn port
proto udp

#bridging directive
dev tap0 ## If you need multiple tap devices, add them here
up "/etc/openvpn/up.sh br0 tap0 1500"
down "/etc/openvpn/down.sh br0 tap0"

persist-key
persist-tun

#certificates and encryption
ca ca.crt
cert server.crt
key server.key  # This file should be kept secret
dh dh1024.pem
tls-auth ta.key 0 # This file is secret

cipher BF-CBC        # Blowfish (default)
comp-lzo

#DHCP Information
ifconfig-pool-persist ipp.txt
server-bridge 192.168.1.10 255.255.255.0 192.168.1.100 192.168.1.110
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"


#push "dhcp-option DOMAIN yourdomain.com"
#push "redirect-gateway local def1"
#push "dhcp-option DNS 8.8.8.8"
#push "redirect-gateway def1 bypass-dhcp"
#push "dhcp-option DNS 192.168.1.1"
#push "dhcp-option DNS 8.8.8.8"


max-clients 10 ## set this to the max number of clients that should be connected at a time

#log and security
user nobody
group nogroup
keepalive 10 120
status openvpn-status.log
verb 3

/ etc / network / 인터페이스 :

root@ironman:~# cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
#auto lo
#iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp
#############OPEN VPN SETUP###############
## This is the network bridge declaration

## Start these interfaces on boot
auto lo br0

iface lo inet loopback

iface br0 inet static
  address 192.168.1.101
  netmask 255.255.255.0
  gateway 192.168.1.1
  bridge_ports eth0
  nameserver 8.8.8.8
iface eth0 inet manual
  up ip link set $IFACE up promisc on
  down ip link set $IFACE down promisc off
  nameserver 8.8.8.8

root@ironman:~# cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 192.168.1.1


root@ironman:~# ping google.com
PING google.com (74.125.239.100) 56(84) bytes of data.
64 bytes from nuq05s01-in-f4.1e100.net (74.125.239.100): icmp_req=1 ttl=55 time=22.6 ms
64 bytes from nuq05s01-in-f4.1e100.net (74.125.239.100): icmp_req=2 ttl=55 time=21.7 ms
64 bytes from nuq05s01-in-f4.1e100.net (74.125.239.100): icmp_req=3 ttl=55 time=22.8 ms

도움을 주시면 감사하겠습니다.



답변

이것은 나를 위해 작동합니다 : http://www.softwarepassion.com/solving-dns-problems-with-openvpn-on-ubuntu-box/

중요한 단계는 클라이언트 openvpn 구성 파일에 다음 세 줄을 추가하는 것입니다.

script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

또한 resolvconf이 스크립트가 의존 하는 패키지가 클라이언트에 설치되어 있는지 확인하십시오 .

openvpn 클라이언트 서비스 또는 명령 ( sudo openvpn youropenvpn.conf) 과 함께 작동합니다 .

그러나이 구성에서는 Ubuntu Network Manager가 작동하지 않습니다. 지금까지 문제가 있습니다 : https://bugs.launchpad.net/ubuntu/+source/openvpn/+bug/1211110


답변

12.04를 다시 설치할 때이 단계를 잊었습니까?

에코 1> / proc / sys / net / ipv4 / ip_forward

출처 : https://openvpn.net/index.php/open-source/documentation/miscellaneous/88-1xhowto.html


답변