V
V
Vitaly2015-11-10 17:35:19
Debian
Vitaly, 2015-11-10 17:35:19

How to bind to dynamic IP address for LT2P + IPSEC (libreswan) server?

There is a home server, Proxmox is used as a hypervisor. One of the virtual machines acts as a gateway, on which the VPN server (l2tp + libreswan) is up and running successfully.
The VPN was set by the script , but it doesn’t matter, I’ll also successfully raise it with my hands if necessary.
excerpt from ipcec.conf

left=x.x.x.x
  leftid=x.x.x.x
  leftsubnet=x.x.x.x/32
  leftnexthop=%defaultroute
  leftprotoport=17/1701
  rightprotoport=17/%any
  right=%any
  rightsubnetwithin=0.0.0.0/0

this is how it works fine, but how to set up left / right, provided that the server has a dynamic ip address? At the same time, IP is resolved by domain, but such changes in the config did not lead to success.
left=<b>%any</b>
  leftid=<b>example.com</b>
  leftsubnet=<b>0.0.0.0/0</b>
  leftnexthop=%defaultroute
  leftprotoport=17/1701
  rightprotoport=17/%any
  right=%any
  rightsubnetwithin=0.0.0.0/0

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bely87, 2015-11-10
@bely87

I did the same on mikrotik l2tp + ipsec
.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question