Stop Preserving Remote Address

Need help configuring your VPN? Just post here and you'll get that help.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
tekcap
OpenVpn Newbie
Posts: 3
Joined: Tue Aug 27, 2019 2:37 am

Stop Preserving Remote Address

Post by tekcap » Fri Jan 21, 2022 4:08 am

I can't figure out how to stop this from happening every time I try to connect using OpenVPN client on Linux (Debian)

TCP/UDP: Preserving recently used remote address: [AF_INET]x.x.x.x:1198

I do not want to preserve this address. I want my client to request the server for a new ip address each time. It seems to do that in windows, but not in Linux.

What can I do to stop this from happening?

User avatar
TinCanTech
Forum Team
Posts: 10721
Joined: Fri Jun 03, 2016 1:17 pm

Re: Stop Preserving Remote Address

Post by TinCanTech » Fri Jan 21, 2022 4:38 am

Openvpn is referring to your DNS cache.

If you absolutely want to get rid of this informative message
then you will have to wait a very long, long time, indeed.

tekcap
OpenVpn Newbie
Posts: 3
Joined: Tue Aug 27, 2019 2:37 am

Re: Stop Preserving Remote Address

Post by tekcap » Fri Jan 21, 2022 2:46 pm

TinCanTech wrote:
Fri Jan 21, 2022 4:38 am
Openvpn is referring to your DNS cache.

If you absolutely want to get rid of this informative message
then you will have to wait a very long, long time, indeed.
Thanks for the heads up, I guess that I'll give up on this for now.

I'm trying to make my own kill switch in linux and I went through the trouble of manually modifying all the routes in my routing table.

First thing I do is delete the route which allows me to get out to the Internet

route del -net 0.0.0.0 netmask 0.0.0.0

Then I went and found the IP Address of the VPN server and manually allowed that route

route add -net x.x.x.x netmask 255.255.255.255 gw 192.168.2.1 metric 1024 ens33 (x.x.x.x is the IP address of the vpn server)

Now when I do this in Windows, it manages to connect, but in Linux I need to have a route for my own VPN IP address and that's really annoying.

route add -net x.x.x.x netmask 255.255.255.255 gw 192.168.2.1 metric 1024 ens33 (x.x.x.x is my IP address provided by vpn server)

This seems to be because OpenVpn is caching it instead of contacting the server for a new one

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

Re: Stop Preserving Remote Address

Post by openvpn_inc » Fri Jan 21, 2022 3:12 pm

tekcap wrote:
Fri Jan 21, 2022 4:08 am
I can't figure out how to stop this from happening every time I try to connect using OpenVPN client on Linux (Debian)

TCP/UDP: Preserving recently used remote address: [AF_INET]x.x.x.x:1198

I do not want to preserve this address. I want my client to request the server for a new ip address each time. It seems to do that in windows, but not in Linux.

What can I do to stop this from happening?
Hi tek,

Are you not using --persist-remote-ip in your configuration?

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

Post Reply