Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Run script before connecting to L2TP server

    Scheduled Pinned Locked Moved General pfSense Questions
    1 Posts 1 Posters 202 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dbykov
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.