Navigation

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

    NAT rules

    NAT
    2
    3
    1666
    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.
    • M
      mattias197711 last edited by

      Hey.

      want to ask if these rules can work.
      i used them on my Debian some years ago want to ask so i can change it before i lock my self out :p

      iptables -A INPUT -p tcp -m tcp –dport 2222 -j ACCEPT
      iptables -A INPUT -p tcp -m tcp --dport 8000 -j ACCEPT
      iptables -A INPUT -p tcp -m tcp --dport 8001 -j ACCEPT
      iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
      iptables -A INPUT -p tcp -m tcp --dport 88 -j ACCEPT
      iptables -A INPUT -p tcp -m tcp --dport 8080 -j ACCEPT

      iptables -A INPUT -i lo -j ACCEPT
      iptables -A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT
      iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
      iptables -A OUTPUT -j ACCEPT
      iptables -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied: " --log-level 7
      iptables -A INPUT -j REJECT
      iptables -A FORWARD -j REJECT

      iptables -A INPUT -j DROP

      2222 - 80 - 8080 on pfsense
      and the other once on NAS

      1 Reply Last reply Reply Quote 0
      • P
        podilarius last edited by

        As written the rules won't work as there is no iptables in pfsense. But the rules will work if translated to of style rule in the GUI. There is already anti lock out rules in place.

        1 Reply Last reply Reply Quote 0
        • M
          mattias197711 last edited by

          i just copy/paste from old file.

          but thanks now i know a bit more

          1 Reply Last reply Reply Quote 0
          • First post
            Last post

          Products

          • Platform Overview
          • TNSR
          • pfSense Plus
          • Appliances

          Services

          • Training
          • Professional Services

          Support

          • Subscription Plans
          • Contact Support
          • Product Lifecycle
          • Documentation

          News

          • Media Coverage
          • Press
          • Events

          Resources

          • Blog
          • FAQ
          • Find a Partner
          • Resource Library
          • Security Information

          Company

          • About Us
          • Careers
          • Partners
          • Contact Us
          • Legal
          Our Mission

          We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

          Subscribe to our Newsletter

          Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

          © 2021 Rubicon Communications, LLC | Privacy Policy