How to fix "WARNING: You have specified redirect-gateway and redirect-private at the same time"

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
Elrick91
OpenVpn Newbie
Posts: 6
Joined: Sun Apr 11, 2021 7:51 am

How to fix "WARNING: You have specified redirect-gateway and redirect-private at the same time"

Post by Elrick91 » Tue Apr 20, 2021 7:41 pm

Hi to all,

I have installer OpenVPN Access Server successfully on Docker.
I try to optimise ovpn configuration file with the error message displayed.

During connection, i see this error message :

Obsolete option --dhcp-release detected. This is now on by default
WARNING: You have specified redirect-gateway and redirect-private at the same time (or the same option multiple times). This is not well supported and may lead to unexpected results
WARNING: You have specified redirect-gateway and redirect-private at the same time (or the same option multiple times). This is not well supported and may lead to unexpected results
WARNING: You have specified redirect-gateway and redirect-private at the same time (or the same option multiple times). This is not well supported and may lead to unexpected results


ovpn config file on client side :

Code: Select all

cipher AES-256-CBC
setenv FORWARD_COMPATIBLE 1
client
proto udp
nobind
remote 1XX.XXX.XXX.XXX
port XXXXXXXX
dev tun
dev-type tun
ns-cert-type server
setenv opt tls-version-min 1.0 or-highest
reneg-sec 604800
sndbuf 0
rcvbuf 0
auth-user-pass
comp-lzo no
verb 3
setenv PUSH_PEER_INFO
<ca>
.............
</ca>
<cert>
.............
</cert>
<key>
............
</key>
key-direction 1
<tls-auth>
............
</tls-auth>
cipher AES-256-GCM
## -----BEGIN RSA SIGNATURE-----
## -----END CERTIFICATE-----
Do you know how to fix it please ?

Best Regards,

EL

chilinux
OpenVPN User
Posts: 38
Joined: Thu Mar 28, 2013 8:31 am

Re: How to fix "WARNING: You have specified redirect-gateway and redirect-private at the same time"

Post by chilinux » Thu Apr 22, 2021 7:27 pm

Out of curiousity, can you provide a link to the Docker Hub image you are working with?

As far as I know, none of the docker images are officially supported.

You should consider using one of the offical packages provided here:
https://openvpn.net/vpn-software-packages/

Also point of using OpenVPN AS is to trust in product to produce the best results for the OVPN files.

If you have questions about why specific configuration options are or are not used, you may want to contact OpenVPN AS support. They can either explain the reasoning behind the current confgiuration settings or apply your suggestions in a future release.

Elrick91
OpenVpn Newbie
Posts: 6
Joined: Sun Apr 11, 2021 7:51 am

Re: How to fix "WARNING: You have specified redirect-gateway and redirect-private at the same time"

Post by Elrick91 » Fri Apr 23, 2021 12:28 pm

Image used is available here : image: ghcr.io/linuxserver/openvpn-as
Docker is very low consuming, ~1% cpu in charge, around 400mo of ram... very impressive.

Where can i get support ? could help me please ?
Best Regards.

chilinux
OpenVPN User
Posts: 38
Joined: Thu Mar 28, 2013 8:31 am

Re: How to fix "WARNING: You have specified redirect-gateway and redirect-private at the same time"

Post by chilinux » Fri Apr 23, 2021 9:05 pm

I agree that Docker is powerful and has many uses. In this specific case I recommend that this is not one of those uses.

The issue is not the resource consumption of Docker as much as the sandbox established for the container environment. It is assumed for security reasons applications running in the Docker container should not have full control over the host network configuration.

Some features of OpenVPN AS may not work as intended inside the sandbox Docker establishes.

For example, fail-over support via the uCARP daemon assumes greater control over the host network interfaces.

Another example of a feature that may not work correctly is the option to enable NAT which assumes control over the host iptables/firewall rules.

There may be other things as well that can't function the same when run inside a Docker container.

If you want to use OpenVPN AS in a fully supported configuration, you should use one of the software packages they provide instead.

As to the types of tweaks you are trying to get working for the OVPN configuration, I would again recommend talking to OpenVPN AS support to get further advice.

If your primary goal is to have an easy to use web interface for using OpenVPN then OpenVPN AS running outside of Docker may fit your needs well.

If don't really need the web interface but desire to selectively tweak a OpenVPN server running inside Docker, then there are other OpenVPN/EasyRSA docker images for doing that.

Elrick91
OpenVpn Newbie
Posts: 6
Joined: Sun Apr 11, 2021 7:51 am

Re: How to fix "WARNING: You have specified redirect-gateway and redirect-private at the same time"

Post by Elrick91 » Sat Apr 24, 2021 7:14 am

I find it a bit pathetic that they don't want to answer to this question.
I think I'll live with it because it doesn't generate any running problems and I won't trade using docker for a VM to achieve the same result, make no sens.

Post Reply