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

    Add nat rule from shell

    Scheduled Pinned Locked Moved General pfSense Questions
    5 Posts 3 Posters 1.0k 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.
    • ?
      Guest
      last edited by

      Hello,
      Is it possible to add and delete a NAT rule from the shell / ssh?
      I want to make a script that can automatically add or delete a NAT rule if ping results fail.

      1 Reply Last reply Reply Quote 0
      • ?
        Guest
        last edited by

        Anyone know a solution?

        1 Reply Last reply Reply Quote 0
        • D
          doktornotor Banned
          last edited by

          No.

          1 Reply Last reply Reply Quote 0
          • GertjanG
            Gertjan
            last edited by

            The original script that does so isn't good enough ?
            Did you have a look at this script: htttp://yourpfesense/firewall_nat_edit.php ?

            No "help me" PM's please. Use the forum, the community will thank you.
            Edit : and where are the logs ??

            1 Reply Last reply Reply Quote 0
            • ?
              Guest
              last edited by

              The original page is not working for me, I want a specific NAT rule only active if the internet connection (gateway) is down, otherwise the NAT rule must remain off.

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