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

    Help adding two static nat rules

    Scheduled Pinned Locked Moved NAT
    5 Posts 3 Posters 1.1k 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.
    • J
      janjessen
      last edited by

      Hi

      I want to add these two static nat rules via the pfsense gui (running latest version) how would i go about doing that ?

      iptables -t nat -A PREROUTING -d 8.8.8.8 -j DNAT –to-destination 208.122.23.22
      iptables -t nat -A PREROUTING -d 8.8.4.4 -j DNAT --to-destination 208.122.23.23

      Best regards
      Jan

      1 Reply Last reply Reply Quote 0
      • J
        jonaskul
        last edited by

        That would be through Firewall: NAT: Outbound.

        1 Reply Last reply Reply Quote 0
        • J
          janjessen
          last edited by

          I can't seem to get it to work, can anyone tell what to put in the gui

          1 Reply Last reply Reply Quote 0
          • johnpozJ
            johnpoz LAYER 8 Global Moderator
            last edited by

            so you want to redirect queries to googledns to voxel? Why would be my first question ;)

            But how to do it would be like this - going to use opendns as my example because its easy to show that its working because there is a url to test if using opendns.

            So as you can see from first attachment - my box is set to use 8.8.8.8 for dns - and if I use the http://www.opendns.com/welcome/ check url to see if using opendns.. Tells my nope not using it.

            But if I do a nat, which no is not on the outbound tab btw, but you would set the interface to your lan interface vs the wan under the nat tab.

            See it says using opendns, but my box is pointed to google.. Just use whatever dns IP you want to redirect to in the rule vs my example of opendns.  BTW once you make the nat(portforward) make sure you flush your local dns cache and restart your browser or close the tab, etc. - they like to cache dns as well.

            notusing.png
            notusing.png_thumb
            natrule-opendns.png
            natrule-opendns.png_thumb
            showsusinggooglebutusingopen.png
            showsusinggooglebutusingopen.png_thumb

            An intelligent man is sometimes forced to be drunk to spend time with his fools
            If you get confused: Listen to the Music Play
            Please don't Chat/PM me for help, unless mod related
            SG-4860 24.11 | Lab VMs 2.8, 24.11

            1 Reply Last reply Reply Quote 0
            • J
              janjessen
              last edited by

              Hi johnpoz

              Thank you! just got it working  :D

              To answer your question: I need that NAT to be able to use the unblockus service with my chromecast device which is hardcoded by google to
              use 8.8.8.8 and 8.8.4.4 so it's kind of a work around.

              I just could't figure out how to build the NAT rule in the gui, so ones again thanks for your help  :)

              Kind regards
              Jan

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