View previous topic :: View next topic |
Author |
Message |
jankom Guru
Joined: 30 Aug 2021 Posts: 365 Location: USA
|
Posted: Wed Sep 07, 2022 4:52 pm Post subject: OVPN name resolution -edited 09/26/2022 as SOLVED |
|
|
I had a working system at home in the US with wpa_supplicant WiFi and a virtual ovpn server. Now I'm traveling in Europe and first the WiFi access did not work after wpa_supplican was updated to 2.10. Finally it is solved using "iwd" instead, and with help from this Forum - see my SOLVED post there. However OVPN access is only partially working: No name resolution. There is Internet access, I can ping a public IP, but not by name. I tried not only my previously working server and client configurations, but also configurations according to Gentoo-Wiki. I looked at a similar post on this forum from 2016, but due to my limited experience and knowledge of networking I ask for help.
The important thing is that everything worked in the US. After connecting to VPN server my public IP became the server's IP, Internet access was OK. I did not change iptables settings or configurations on the OVPN server and client, yet name resolution fails if VPN started. The OVPN "server" is a virtual machine in the US, the "client" is a Fitlet2 machine traveling with me. Both the server and the client have Gentoo installed.
EDIT 09/08/2022 - additional info:
(1) before VPN connection: Code: | dig +short myip.opendns.com @resolver1.opendns.com | gives my public IP
(2) Code: | ping -c 1 resolver1.opendns.com | gives IP of the service (see next)
(3) Code: | dig +short myip.opendns.com @208.67.222.222 | gave the same public IP - OK
(4) after VPN connection command in (3) gave the new public IP, the IP of my OVPN server. Good!
So in fact I'm connected to the Internet tunneled to my OVPN server.
BUT
no dns resolving ?!?
/etc/resolv.conf file on both machines not changed VPN connect or not, and have IP addresses of resolvers.
Hope this helps.
Respectfully - Janos (jankom)
09/26/22: see last posts; this issue is now considered SOLVED - Janos (ankom)
Last edited by jankom on Mon Sep 26, 2022 9:38 pm; edited 1 time in total |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Thu Sep 08, 2022 1:25 pm Post subject: |
|
|
Hi,
do you run a dns server on your OpenVPN Server in the US? If yes, which DNS Server and did you allow access via vpn to the dns server? Please post the resolv.conf before and after connecting to the OpenVPN Server.
Please check the IP address, you get in the public wireless. Maybe its in the same range as your vpn connection. A traceroute to maybe 8.8.8.8 would be interesting as well. This should show, whether you are going through the tunnel or not to access this host.
Greetings Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 365 Location: USA
|
Posted: Thu Sep 08, 2022 2:15 pm Post subject: |
|
|
Thx Stefan,
No, I do not run a DNS server. The virtual machine in the US has its own public IP.
(a) on Fitle2 machine in Hungary (OVPN client) Quote: | # Generated by dhcpcd from wlan0.dhcp
# /etc/resolv.conf.head can replace this line
domain home
nameserver 80.244.99.36
nameserver 80.244.99.37
# /etc/resolv.conf.tail can replace this line
| - same if VPN is active
(b) on virtual machine, in the US (OVPN server) Code: | gellert@jgklinux ~ $ cat /etc/resolv.conf
# Generated by dhcpcd from eth0.dhcp
# /etc/resolv.conf.head can replace this line
domain members.linode.com
nameserver 173.230.140.5
nameserver 66.228.59.5
nameserver 66.228.62.5
# /etc/resolv.conf.tail can replace this line
gellert@jgklinux ~ $ | - same if VPN is active
Interesting traceroute, first with VPN then without: Code: | janos@andraslinux ~ $ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 jgklinux (10.8.0.1) 123.094 ms 123.086 ms 129.195 ms
2 172.105.134.1 (172.105.134.1) 129.224 ms 129.217 ms 129.242 ms
3 10.204.64.16 (10.204.64.16) 129.238 ms 10.204.64.15 (10.204.64.15) 129.234 ms 10.204.64.16 (10.204.64.16) 129.260 ms
4 10.204.32.40 (10.204.32.40) 129.194 ms 10.204.32.42 (10.204.32.42) 129.218 ms 129.190 ms
5 10.204.32.67 (10.204.32.67) 131.849 ms 131.870 ms 10.204.32.71 (10.204.32.71) 131.904 ms
6 74.207.239.48 (74.207.239.48) 131.835 ms 232.715 ms 232.704 ms
7 206.71.12.25 (206.71.12.25) 276.834 ms 276.638 ms 276.701 ms
8 108.170.249.33 (108.170.249.33) 276.788 ms 108.170.249.65 (108.170.249.65) 276.692 ms^C
janos@andraslinux ~ $ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 192.168.0.1 (192.168.0.1) 5.535 ms 6.241 ms 7.333 ms
2 * * *
3 catv-89-135-214-157.catv.fixed.vodafone.hu (89.135.214.157) 29.313 ms 29.260 ms 29.206 ms
4 catv-89-133-4-101.catv.fixed.vodafone.hu (89.133.4.101) 37.712 ms 37.649 ms 38.385 ms
5 * catv-89-133-4-1.catv.fixed.vodafone.hu (89.133.4.1) 31.171 ms *
6 * * *
7 * * *
8 dns.google (8.8.8.8) 23.155 ms 23.103 ms 21.172 ms
janos@andraslinux ~ $ |
I stopped the process in the first case because it was just hopping around the cloud. Evidently I do go through the tunnel. 10.8.0.1 is the tunneled private IP of the server (in the US) and 10.8.0.2 is on the other side of the tunnel - in hungary. |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Thu Sep 08, 2022 8:00 pm Post subject: |
|
|
Hmm, i tried to use the dns servers of your resolv.conf to run nslookup. it seems these are no dns servers, thats why no resolution works. I always get a dns timeout. maybe you should change them to something that should definitly work (maybe 1.1.1.1 hosted by cloudflare or 8.8.8.8 hosted by google).
Code: | > server 80.244.99.36
Standardserver: [80.244.99.36]
Address: 80.244.99.36
> www.google.de
Server: [80.244.99.36]
Address: 80.244.99.36
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Zeitüberschreitung bei Anforderung an [80.244.99.36].
> server 80.244.99.37
DNS request timed out.
timeout was 2 seconds.
Standardserver: [80.244.99.37]
Address: 80.244.99.37
> www.google.de
Server: [80.244.99.37]
Address: 80.244.99.37
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Zeitüberschreitung bei Anforderung an [80.244.99.37].
>
|
Sorry for the german output on some lines, i was using a windows for the short test...
Greetings Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
madmin n00b
Joined: 04 Nov 2018 Posts: 29
|
Posted: Fri Sep 09, 2022 11:09 am Post subject: |
|
|
Hi there,
Q1: I'm not to understand what's the problem... when you wrote "no dns resolving", did you try to change the DNS servers on your OpenVPN client to use some DNS server which is known to work (as 8.8.8.8, 1.1.1.1)?
If the point is to get DNS resolution in general (meaning not using one specific [bunch of] DNS server[s] to get access to specific DNS zone[s], I would use a standard DNS server (one from your ISP or one open like the two mentioned previously).
I'm in France with no specific account or anything related to opendns.com. When using "nmap" to check the status of TCP/53 and UDP/53 on the 5 DNS servers used in your resolv.conf as nameserver, everything is filtered (meaning that some kind of firewall is blocking the access to these ports on these IPs).
UDP check:
Code: | $ sudo nmap -Pn -sU -p53 173.230.140.5 66.228.59.5 66.228.62.5 80.244.99.36 80.244.99.37
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-09 12:56 CEST
Nmap scan report for resolver05.atlanta.linode.com (173.230.140.5)
Host is up (0.12s latency).
PORT STATE SERVICE
53/udp closed domain
Nmap scan report for resolver06.atlanta.linode.com (66.228.59.5)
Host is up (0.12s latency).
PORT STATE SERVICE
53/udp closed domain
Nmap scan report for resolver07.atlanta.linode.com (66.228.62.5)
Host is up (0.12s latency).
PORT STATE SERVICE
53/udp closed domain
Nmap scan report for 80.244.99.36
Host is up.
PORT STATE SERVICE
53/udp open|filtered domain
Nmap scan report for 80.244.99.37
Host is up.
PORT STATE SERVICE
53/udp open|filtered domain
Nmap done: 5 IP addresses (5 hosts up) scanned in 0.94 seconds
|
TCP check:
Code: | $ nmap -Pn -p53 173.230.140.5 66.228.59.5 66.228.62.5 80.244.99.36 80.244.99.37
Starting Nmap 7.92 ( https://nmap.org ) at 2022-09-09 12:54 CEST
Nmap scan report for resolver05.atlanta.linode.com (173.230.140.5)
Host is up (0.12s latency).
PORT STATE SERVICE
53/tcp filtered domain
Nmap scan report for resolver06.atlanta.linode.com (66.228.59.5)
Host is up (0.12s latency).
PORT STATE SERVICE
53/tcp filtered domain
Nmap scan report for resolver07.atlanta.linode.com (66.228.62.5)
Host is up (0.12s latency).
PORT STATE SERVICE
53/tcp filtered domain
Nmap scan report for 80.244.99.36
Host is up.
PORT STATE SERVICE
53/tcp filtered domain
Nmap scan report for 80.244.99.37
Host is up.
PORT STATE SERVICE
53/tcp filtered domain
Nmap done: 5 IP addresses (5 hosts up) scanned in 0.94 seconds
|
"-Pn" is there to force nmap to check the port status even if the server does not answer to ICMP/ping.
"-sU" needs root privileges and is to check UDP rather than TCP.
So, for me, these five machines or not DNS servers or are configured to offer DNS service only to specific clients (ie: specific IPs generally).
Q2: Is one these five DNS servers working on one of your machine?
Q3: what was the goal of these specific DNS servers?
Cheers |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 365 Location: USA
|
Posted: Fri Sep 09, 2022 4:40 pm Post subject: @madmin |
|
|
Thanks for the nmap trick and for yur interest in this problem.
Q3 - the problem is that if connected with iwd WiFi in Hungary and VPN tunneled into the Atlanta virtual machine there is no name resolution. Disconnecting VPN Internet works fine.
Q2 - without VPN everything is fine. I edited /etc/resolv.conf file to change nameserver from the Hungarian ISP dhcp assigned nameservers to 1.1.1.1 or other nameservers and they all work, but as soon as VPN connection is established there is no name resolution.
Q1 Quote: | did you try to change the DNS servers on your OpenVPN client to use some DNS server which is known to work (as 8.8.8.8, 1.1.1.1)? | sorry, I do not know how to change DNS servers on OpenVPN client,
The system worked fine in the US, but not here in Hungary. First wpa_supplicant could not connect to WiFi. Now WiFi connection is fine with iwd, but VPN connection stops name resolution.
As I mentioned in my original post Code: | dig +short myip.opendns.com @208.67.222.222 | does work when VPN connected using IP to reach Internet, and it gives my US public IP from the virtual machine in the US.
Something is blocking obtaining name resolution.
Cheers - jankom |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Fri Sep 09, 2022 9:44 pm Post subject: |
|
|
Please show the output of "ip r" with and without the vpn connection. It looks like, you cant reach anything since the routing is messed up after you start your vpn. Also, does the VPN in US masq connections through it? I think you set up a private network address range for your openvpn.
Greetings Stefan
edit: "ip a" would be interesting as well in this case (you can x-out the public ip address of your wireless device). _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
madmin n00b
Joined: 04 Nov 2018 Posts: 29
|
Posted: Sat Sep 10, 2022 6:08 am Post subject: |
|
|
You're welcome ; )
Stephan is right, output of "ip a" and "ip r" given twice (connected and not connected) shall help.
Doing a ping test (on an IP anywhere on internet, outside your private networks) once connected too...
But it seems that your issue in only on DNS resolution when connected to the VPN, meaning that when you are connected to the VPN, you can reach internet using IPs (as per (4) in your first post).
If you can ping outside or use outside DNS server (as in (4)) when connected to your VPN, I'd bet on an issue on DNS configuration on your OpenVPN client (Fitle2 I believe).
If I'm right you can manually manage your DNS server (through /etc/resolv.conf) AND tell your DHCP clients (plural because it shall be run twice, for your main/real interface and for your VPN interface) to stop managing DNS servers.
How to disable DNS management through DHCP will depend on how the cards are configured:
- with systemd-networkd:
Code: | cat /etc/systemd/network/dhcpv4.network
[Match]
Name=*
[DHCPv4]
UseDNS=yes
UseDomains=yes
UseRoutes=yes
UseGateway=yes
|
That way is kind of rough as it applies to all interfaces (Name=*)
- with /etc/conf/net file: see Gentoo Handbook:
Quote: | nodns
Don't overwrite /etc/resolv.conf |
- if DHCP client is run by OpenVPN, it could be in the OpenVPN client configuration file that the modification has to be done...
Cheers |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 365 Location: USA
|
Posted: Sat Sep 10, 2022 8:05 am Post subject: Thank you, both! |
|
|
We're almost there. I do have name resolution while connected to VPN.
First of all, a correction, my mistake: during debugging this situation I messed up the OVPN server conf. Restoring to original (US) version and editing resolv.conf on the server to use 1.1.1.1 name resolution does work with VPN.
It also works if I use the "filtered" name server of my OVPN server machine in Atlanta, GA.
My Gentoo system uses openRC.
Also, I think part of the problem is that iwd has its own dhcp service. Therefore right now the only solution that works for me is to manually edit resolv.conf file on Fitlet2, the VPN client. Will see what happens when I get back to the US and my ISP will assign a "filtered" name server.
For the record here is my ip a and ip r without VPN:
Quote: | 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0
3: enp2s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:01:c0:2c:7e:67 brd ff:ff:ff:ff:ff:ff
4: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether 00:01:c0:2c:7e:65 brd ff:ff:ff:ff:ff:ff
altname enp3s0
6: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether c8:e2:65:42:5f:a4 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.136/24 brd 192.168.0.255 scope global dynamic noprefixroute wlan0
valid_lft 3430sec preferred_lft 2980sec
inet6 fe80::2c0d:7beb:140c:ee22/64 scope link
valid_lft forever preferred_lft forever
default via 192.168.0.1 dev wlan0 proto dhcp src 192.168.0.136 metric 3006
192.168.0.0/24 dev wlan0 proto dhcp scope link src 192.168.0.136 metric 3006
| With VPN connected I'm only posting the diff with public IP redacted: Quote: | 17c17
< valid_lft 3430sec preferred_lft 2980sec
---
> valid_lft 3348sec preferred_lft 2898sec
19a20,26
> 8: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 500
> link/none
> inet 10.8.0.2/24 scope global tun0
> valid_lft forever preferred_lft forever
> inet6 fe80::3778:ffff:ebc2:df32/64 scope link stable-privacy
> valid_lft forever preferred_lft forever
> 0.0.0.0/1 via 10.8.0.1 dev tun0
20a28,29
> 10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.2
> 128.0.0.0/1 via 10.8.0.1 dev tun0
21a31
> XXX.XXX.XXX.XXX via 192.168.0.1 dev wlan0
| This by the way was the same when name resoltion was blocked, i.e. the root cause must be in the client's resolv.conf file and my Hungarian ISP interfering with same file. I have even noticed that resolv.conf was changed while connected to VPN if it had an edited "filtered" ip in it.
Now I have to go, will be back late tonight, and thanks again - jankom |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 365 Location: USA
|
Posted: Sun Sep 11, 2022 4:41 pm Post subject: addendum - SOLVED? |
|
|
I could mark this thread as SOLVED but my solution is just a brute force method and it is not stable.
I created a script that I can invoke from menu after VPN is activated..It overwrites "etc/resolv/conf" file with resolv.conf.vpn file. This way I can access some of the US based banking and other web sites which otherwise would not let me do much because of a foreign IP address.
Using VPN and the"filtered" name servers things do work though intermittently. Occasionally /etc/resolv.conf is regenerated by the Hungarian ISP, so I have to rerun the copy script.
Btw, I tried the gentoo specific /etc/conf.d/net "nodns" method. Nevertheless the resolv.conf file is regenerated with Hungarian ISP nemaservers. So the only solution now is the brute force.
Thanks anyway for the help and direction I received on this forum - ankom (janos) |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Wed Sep 14, 2022 2:16 pm Post subject: |
|
|
It looks like you are trying to redirect your default gateway:
Code: |
0.0.0.0/1 via 10.8.0.1 dev tun0
10.8.0.0/24 dev tun0 proto kernel scope link src 10.8.0.2
|
since i wasnt able to use your provided non us dns servers as well, it seems that they do not allow to get asked via a non Hungarian IP. If you redirect all your traffic through the tunnel, you MUST use a non Hungarian DNS server for resolving addresses. So your did not really do it the "brute force way". You can also let the OpenVPN Client/Server overwrite your DNS config and if you disconnect, let it revert the config.
Greeting Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 365 Location: USA
|
Posted: Sat Sep 17, 2022 3:14 pm Post subject: |
|
|
Thx Stefan. I was away for a few days.
Yes, initially, before I turned to this forum, I tried to modify the OVPN client configuration (the one on the Fitlet2 machine in Hungary) without success. There is a lot more to learn for me.
My "brute force method" works now: after connecting to WiFi with iwd and starting the OVPN process I overwrite the resolv.conf file with the nameservers my VPN server uses in Atlanta, GA. I is working now without a glitch.
But yes, I would like to do it the correct way, to redirect all network traffic via tun0. What is the correct setting in the vpn client configuration?
Cheers, Janos (jankom |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Tue Sep 20, 2022 2:02 pm Post subject: |
|
|
Hi,
afair its done in the server config and the client config. Please have a look here:
https://openvpn.net/community-resources/how-to/#routing-all-client-traffic-including-web-traffic-through-the-vpn
greeting Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 365 Location: USA
|
Posted: Sat Sep 24, 2022 9:01 pm Post subject: dns and resolv.conf |
|
|
Hi, sorry for the delay in my response to your post. I'm back in the States and catching up with stuff. My OVPN setup with iwd WiFi access works well with my US Internet provider, and did not even have to overwrite the resolv.conf file. This means that the nameserver IP provided my US Internet connector finds servers on the Internet by their name. In Hungary I could only connect to another machine with public IP using their IP, that is there was no name service. I had to rewrite the resolv.conf file on my vpn client (the Fitlet2 machine in Hungary) in order to fully function as a vpn connected machine.
Based on the link in your post I changed the OVPN server configuration by replacing push "redirect-gateway def1 bypass-dhcp" with Quote: | push "dhcp-option DNS 10.8.0.1" | It seems to work here in the US. Now the new resolv.conf file on the client Fitlet2 machine is Code: | # Generated by resolvconf
nameserver 10.8.0.1
nameserver 192.168.72.139
nameserver 2600:1000:b16a:3858::75
| Obviously 10.8.0.1 was prepended to the list of nameservers.
I was concerned about the comment in your link: Quote: | or non-Windows clients with some extra server-side scripting | since my Fitlet2 machine is a non-Windows client. I don't know what the "extra server-side scripting" is - but it works as is.
Next time I go to Hungary I'll see if this is the final and correct setting - not a "brute force" solution.
Thanks and greetings - Janos (jankom) |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 365 Location: USA
|
Posted: Mon Sep 26, 2022 2:48 am Post subject: addendum |
|
|
It looks like the "dhcp-option DNS 10.8.0.1" does nmt change the exposed public IP, therefore it is not a hidden tunnel, so I went back to the original Quote: | push "redirect-gateway def1 bypass-dhcp" | version in the OVPN server configuration. Otherwise everiything works with the ISP provided nameserver in client resolv.conf in the US. When I go back to Hungary I probably will have to use the "brute force" method of rewriting resov.conf after vpn connection is made. |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Mon Sep 26, 2022 6:53 pm Post subject: |
|
|
Hi,
i think you did not understand the config at its specials:
1. "push dhcp-option DNS" should point to you local dns server running in your vpn network (maybe on the same host as the openvpn server). So please think about, whether you network vpn or the network behind your openvpn server equals to 10.8.0.x
2. "push redirect-gateway def1" is still needed, since this will redirect ALL traffic through your vpn, since it reconfigure your default gateway settings
Only if you are running both options successfull, all your traffic (including DNS resolving) will go through your openvpn tunnel. But to be honest, I had a f***ing lot issues get this running as well and switched to wireguard instead. And this was way easier to get this special setup running
Greetings Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 365 Location: USA
|
Posted: Mon Sep 26, 2022 9:35 pm Post subject: Thank you |
|
|
Thank you, it works now with both push directives.
Yes, I did not quite understand that I can have multiple push directives in ovpn server configuration.
And yes, 10.8.0.1 is the server IP of the internal vpn network.
Now I have the correct public IP of the client, and I think it willl work even if outside the US.
Thank you for your patience and expert advice help. I'll mark ths thread finally as SOLVED.
P.S. I looked at wireguard, and plan to replace OVPN with it, especially since its developer is a Gentoo guy.
Peace and happyness!
Janos (jankom) |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Wed Sep 28, 2022 5:25 am Post subject: |
|
|
Hi,
good to see it working now. If you have any questions regarding wireguard config, just let me know
Greeting Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
jankom Guru
Joined: 30 Aug 2021 Posts: 365 Location: USA
|
Posted: Fri Sep 30, 2022 9:53 pm Post subject: wireguard |
|
|
Thanks Stefan - I do need some help with wireguard, but will start a new thread for the sake of clarity and simplicity - Janos |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|