Hi,
Before posting this, i searched a long time and tried many solutions. But none worked. Maybe I'm missing or not understanding something.
Here is my server.conf :
# Serveur TCP/9999
mode server
proto tcp
port 9999
dev tun
# Cles et certificats
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
tls-auth ta.key 1
key-direction 0
cipher AES-256-CBC
# Reseau
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1"
push "dhcp-option DNS 10.8.0.1"
#push "route 10.8.0.0 255.255.255.0"
keepalive 10 120
# Securite
user nobody
group nogroup
chroot /etc/openvpn/jail
persist-key
persist-tun
comp-lzo
# Log
verb 3
mute 20
status openvpn-status.log
log-append /var/log/openvpn.log
Here is my client config :
# Client
client
dev tun
proto tcp-client
remote x.x.x.x 9999
resolv-retry infinite
cipher AES-256-CBC
; client-config-dir ccd
# Cles
ca ca.crt
cert laptopwork.crt
key laptopwork.key
tls-auth ta.key 1
key-direction 1
# Securite
nobind
persist-key
persist-tun
comp-lzo
verb 3
The tunnel mount up successfully, but nothing works because of DNS resolution.
I tried to capture some DNS events :
root@srv:/etc/openvpn# tcpdump -vvv -i tun0 -n port 53
tcpdump: listening on tun0, link-type RAW (Raw IP), capture size 65535 bytes
09:42:34.424559 IP (tos 0x0, ttl 128, id 7881, offset 0, flags [none], proto UDP (17), length 61)
10.8.0.6.65060 > 10.8.0.1.53: [udp sum ok] 56687+ A?
http://www.windguru.cz. (33)
as you can see the request arrives in good shape. but i can't see any reply... But i still get no page on my browser.
(the same tcpdump on localhost shows no incoming request. but i make a local dig, the request shows up in tcpdump).
my network config on client :
Carte Ethernet Connexion au réseau local 3 :
Suffixe DNS propre à la connexion. . . : mydomain.fr (i changed it).
Description. . . . . . . . . . . . . . : TAP-Windows Adapter V9
Adresse physique . . . . . . . . . . . : 00-FF-9C-04-B6-A5
DHCP activé. . . . . . . . . . . . . . : Oui
Configuration automatique activée. . . : Oui
Adresse IPv4. . . . . . . . . . . . . .: 10.8.0.6(préféré)
Masque de sous-réseau. . . . . . . . . : 255.255.255.252
Bail obtenu. . . . . . . . . . . . . . : jeudi 19 mars 2015 09:43:32
Bail expirant. . . . . . . . . . . . . : vendredi 18 mars 2016 09:43:32
Passerelle par défaut. . . . . . . . . :
Serveur DHCP . . . . . . . . . . . . . : 10.8.0.5
Serveurs DNS. . . . . . . . . . . . . : 10.8.0.1
NetBIOS sur Tcpip. . . . . . . . . . . : Activé
To conclude, my bind service is up and running, resolving succesfully on localhost.
I have the forwarders configured in bind config matching the resolv.conf file.
I have ip_forward enabled for ipv4.
I have absolutely no clue on what's going wrong.
Thanks in advance for help (and sorry if my english is not so good 😉).