New answers tagged

0

route 10.99.77.55 255.255.255.255 net_gateway I used this code line in ovpn config so it worked. Now I want to bypass an IP range instead of single IP, How can I do it? something like that: route 10.99.77.55/22 255.255.255.255 net_gateway


0

What type of firewall/forwarding is in place for the server network and the server itself? DMZ or just port forward?


1

Did you activate kernel forwarding? echo 1> /proc/sys/net/ipv4/ip_forward or sysctl -w net.ipv4.ip_forward=1 Your box will act as a router, not as a workstation, and this behaviour is disabled by default, for security reasons! Be sure to permit forward for only legit network ranges from both of your nets using iptables.


0

This is because of PrivateTmp directive in systemd openvpn unit's config. Create /etc/systemd/system/openvpn-server@.service.d/10-override.conf file with following content: [Service] PrivateTmp=false and you'll be able to write to /tmp in your scripts (if you really need to). Change openvpn-server@.service.d to openvpn-server@YOURCONF.service.d to match ...


1

I found the solution. I just need to add a postrouting and forward chain rule from tun1 to tun0. iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE iptables -A FORWARD -i tun1 -o tun0 -j ACCEPT


0

...and today suddenly, and without changing anything, everything works! Don't know what to say... I haven't restarted my computer nor the VPN server... Strange things!


0

You say you opened the .ovpn file and you can see the duplicate-cn configuration line, but the .ovpn file is the client-side config. Just to be clear, did you put the duplicate-cn line in the server.conf file and restart the service?


0

This guide has a dedicated setup for OpenVPN server on Oracle Cloud. https://blogs.oracle.com/developers/post/launching-your-own-free-private-vpn-in-the-oracle-cloud (Archive.org link in case original post goes down)


0

If all your ports are serving http/s content, then setting up nginx or a different reverse proxy would probably be the best way to go. If you need other data streams that are not http/s to work I would suggest using iptables like mentioned in the example here: https://my.esecuredata.com/index.php?/knowledgebase/article/49/how-to-redirect-an-incoming-...


0

Here is what we got (your image will be unavailable soon) v-------<<--VPN2---------------v [CLI1]---[SRV1]---{Internet}---[SRV2]---[CLI2] ^------------VPN1->>-----------^ What you are doing when establishing the second VPN is setting a second route for the same link CLI1 to CLI2. So when CLI2 try to reach CLI1 using VPN2, CLI1 use ...


0

Be aware of this conflict with server pushed options: https://openvpn.net/faq/overriding-a-pushed-route-in-the-clients-config-throws-an-error/ You may have an error: Options error: option 'route' cannot be used in this context This issue materializes because “route-nopull” option takes away the permission from the client to install server-pushed routes, ...


0

It had nothing to do with openVPN. They confirmed there was a problem with their network. It is exactly as it says in my initial post. "check your network connectivity".


0

I have the same problem. I checked NordVPN UDP and TCP connections from this link. with the same ADSL network that I have problem. NordVPN connections worked very well, but all of other openvpn TCP and UDP connections are blocked except openvpn+proxy connections. openvpn+proxy is very slow. I don't know why NordVPN TCP and UDP connections work without any ...


1

For the systemd-resolved solution to work, openvpn must be stopped with SIGTERM, not with SIGKILL (else, the 'down' hook is not called to bring back /etc/resolv.conf to the original configuration). For example: If you call openvpn on the command line, then CTRL-c out, the 'down' hook is called, because openvpn is killed with SIGTERM If you call openvpn in a ...


0

This message is printed when no IPv4/v6 preference is given in the config (i.e. proto udp/tcp is used) and OpenVPN is running as a server. Just change in server.conf on what you need udp4/upd6: ;proto udp proto udp4 Updated: For tcp protocol (not udp) just change in server.conf on what you need tcp4/tcp6: ;proto tcp proto tcp4 Original Source


0

It sounds like you might be hitting https://bugzilla.redhat.com/show_bug.cgi?id=1112742. Try adding ZONE=trusted to /etc/sysconfig/network-scripts/ifcfg-tun0.


0

This happened to me due to trying some old, invalid certificates. Trying a newly generated profile config fixed it.


2

2022 update (Arch Linux) To set a public dns server and update resolvconf, add the following to your ovpn client profile file: dhcp-option DNS 1.1.1.1 script-security 2 up /usr/share/openvpn/contrib/pull-resolv-conf/client.up down /usr/share/openvpn/contrib/pull-resolv-conf/client.down


0

I post my solution here, maybe it can help someone. I code a script, that would try to query the MAC address of my home router, if success(meaning that I'm home), stop to connect the VPN. And then modify the systemd service file(vpn-to-home.service), add a line ExecStartPre=/usr/local/bin/stop-if-lan.sh. The script stop-if-lan.sh: #!/bin/bash /usr/bin/ping -...


Top 50 recent answers are included