Possible to update alias every 30 seconds?
-
Hello :D
I have OpenVPN site-to-site.
The firewall rule on the WAN allows access to the server from the client based on a source alias for the client that points to a dynamic DNS.
(ALIAS: dVPN, contains: host = dvpn.dynamicdnsservice.–-).
I am having a lot of connection problems resulting in the client getting a new IP let's say once per 5 minutes. So the WAN firewall blocks the site to site almost all of the time.
Is there a way for me to put a job to cron to update that specific dVPN-alias every 10 seconds or so?
Thank you :)
-
I just had a quick look at previous threads messing with Aliases and it looks like you might be able to refresh that alias by removing the IP/hostname from the list and adding it back again, eg:
pfctl -t dVPN -T delete dvpn.dynamicdnsservice.–-
pfctl -t dVPN -T add dvpn.dynamicdnsservice.---It may also work with the replace command but for me with a hostname that HASN'T changed IP it just says "no changes". Its unclear if it did an actual DNS lookup to come to that conclusion or just verified the hostname is the same.
pfctl -t dVPN -T replace dvpn.dynamicdnsservice.---
-
If you don't have a lot of aliases…..
What about "Aliases Hostnames Resolve Interval" setting at "System --> Advanced --> Firewall & NAT" ?
-
@ptt:
If you don't have a lot of aliases…..
What about "Aliases Hostnames Resolve Interval" setting at "System --> Advanced --> Firewall & NAT" ?
Thank you too :)
I can only give one 'thank you' in this thread, apparently, so I hit you with the karma stick ;D
-
You're welcome ! Glad to be of help