Question about WARNING message: 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
gog
OpenVpn Newbie
Posts: 9
Joined: Mon Jul 12, 2021 4:13 am

Question about WARNING message: You have specified redirect-gateway and redirect-private at the same time

Post by gog » Fri Mar 11, 2022 4:32 am

Hi, everyone.

I am trying to create original VPN software with openvpn-2.5.3 source code.
I have connected VPN normally to OpenVPN Access Server 2.9.5 with open-sourced OpenVPN client ,but some error messages are displayed on openvpn client log as follows.

Code: Select all

2022-03-11 13:09:59 VERIFY EKU OK
2022-03-11 13:09:59 VERIFY OK: depth=0, CN=OpenVPN Server
2022-03-11 13:09:59 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384, peer certificate: 2048 bit RSA, signature: RSA-SHA256
2022-03-11 13:09:59 [OpenVPN Server] Peer Connection Initiated with [AF_INET]172.1.1.100:8080
2022-03-11 13:09:59 PUSH: Received control message: 'PUSH_REPLY,explicit-exit-notify,topology subnet,route-delay 5 30,dhcp-pre-release,dhcp-renew,dhcp-release,route-metric 101,ping 12,ping-restart 50,socket-flags TCP_NODELAY,redirect-private def1,redirect-private bypass-dhcp,redirect-private autolocal,redirect-private bypass-dns,route-gateway 1.1.0.1,route 192.168.0.1 255.255.255.255,block-ipv6,ifconfig 1.1.1.104 255.255.0.0,peer-id 0,auth-tokenSESS_ID,cipher AES-256-CBC'
2022-03-11 13:09:59 Obsolete option --dhcp-release detected. This is now on by default
2022-03-11 13:09:59 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
2022-03-11 13:09:59 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
2022-03-11 13:09:59 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
2022-03-11 13:09:59 OPTIONS IMPORT: timers and/or timeouts modified
2022-03-11 13:09:59 OPTIONS IMPORT: --explicit-exit-notify can only be used with --proto udp
2022-03-11 13:09:59 OPTIONS IMPORT: --socket-flags option modified
I would like to fix the following error.
How can I fix this error?


2022-03-11 13:09:59 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
2022-03-11 13:09:59 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
2022-03-11 13:09:59 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


The settings for OpenVPN Access Server are as follows.
・VPN Settings:Should VPN clients have access to private subnets (non-public networks on the server side)? YES ,using NAT
・Specify the private subnets to which all clients should be given access (one per line):
  192.168.0.1/32
・Should client Internet traffic be routed through the VPN?  NO
・Should clients be allowed to access network services on the VPN gateway IP address?  NO
・Do not alter clients' DNS server settings YES
・Have clients use the same DNS servers as the Access Server host NO
・Have clients use specific DNS servers NO

The settings for OpenVPN Client are as follows.

Code: Select all

cipher AES-256-CBC
data-ciphers AES-256-CBC
client
proto tcp
remote foobar.example.net
resolv-retry infinite
port 443
dev tun
dev-type tun
remote-cert-tls server
tls-version-min 1.2
verb 3
push-peer-info
windows-driver wintun
auth-nocache
ca ca_dev.crt
cert client_dev.crt
key client_dev.key
tls-crypt tls.key

Best Regards,

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1332
Joined: Tue Feb 16, 2021 10:41 am

Re: Question about WARNING message: You have specified redirect-gateway and redirect-private at the same time

Post by openvpn_inc » Sat Mar 19, 2022 1:18 pm

Hi,

You can see in what was pushed, the multiple redirect-private settings. You can disregard that warning for Access Server. Our people did/do know what they are doing. :)

I don't know if there is a fine-grained way to make AS not push those multiple --redirect-private settings without breaking something. The log message is part of the open source openvpn(8) software, which was not patched to remove those warnings.

regards, rob0
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

gog
OpenVpn Newbie
Posts: 9
Joined: Mon Jul 12, 2021 4:13 am

Re: Question about WARNING message: You have specified redirect-gateway and redirect-private at the same time

Post by gog » Thu Mar 24, 2022 4:31 am

Hi,

I was very relieved to hear that.
I will ignore this error message.

Kind Regards,

Post Reply