Run script before connecting to L2TP server
-
Hi.
I have a relatively complicated ISP connection: first the WAN interface is configured using DHCP and then an L2TP connection is established over it and used as the default gateway.
The problem here is that my ISP provides a DNS hostname of L2TP server, so it should be resolved via ISP's DNS server before connecting, and I don't want to use that DNS server for all my requests because of it's performance and reliability issues.
My idea is to run a script which will resolve the L2TP server IP address and set it in /etc/hosts each time before this L2TP connection is established.
I'd like to know, what would be the best place to put a call to this script in pfSense?
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.