vpn with dns server for local lan: how to configure it?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • magowiz
    Junior Member
    • Sep 2024
    • 1

    vpn with dns server for local lan: how to configure it?

    Hi,
    I'm trying to make my whole setup work and I reached the point in which I'm able to connect with clients (ubuntu and android) to mine vpn from remote, the only thing is not working is that while I'm connected to this vpn, mine local dns server is not used at all for name resolution, in both cases: ubuntu laptop and android smartphone.

    So I think I specified it wrongly into ovpn file, could you please tell me if this directive is fine, so at least I could start troubleshooting from something that is right ?

    Code:
    script-security 2
    client
    dev tun
    proto tcp
    float
    nobind
    cipher AES-128-CBC
    comp-lzo adaptive
    resolv-retry infinite
    remote-cert-tls server
    persist-key
    remote *********.sytes.net 1194
    dhcp-option DNS 192.168.xxx.yyy
    <ca>
    -----BEGIN CERTIFICATE-----
    [omissis]
    -----END CERTIFICATE-----
    </ca>
    <cert>
    -----BEGIN CERTIFICATE-----
    [omissis]
    -----END CERTIFICATE-----
    </cert>
    <key>
    -----BEGIN PRIVATE KEY-----
    [omissis]
    -----END PRIVATE KEY-----
    </key>
    up /etc/openvpn/update-systemd-resolved
    down /etc/openvpn/update-systemd-resolved
    I introduced dns server ip (that can be reached once in vpn) right after dhcp-option DNS, as you can see:
    dhcp-option DNS 192.168.xxx.yyy
    about script-security 2 I did to try to use in ubuntu update-systemd-resolved, other configurations comes directly from my tp-link x55pro in which I configured my vpn.
    Last edited by magowiz; 2024-09-07, 11:32 AM.
Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎