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

Sourcebased nat?

Scheduled Pinned Locked Moved 1.2.1-RC Snapshot Feedback and Problems-RETIRED
5 Posts 2 Posters 2.8k 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.
  • M
    mastrboy
    last edited by Sep 3, 2008, 7:41 AM

    will sourcebased nat be supported in the GUI for 1.2.1 ?

    If not, could someone point me to information for adding customs rules by shell or something?

    1 Reply Last reply Reply Quote 0
    • N
      nocer
      last edited by Sep 3, 2008, 10:17 AM

      Hi.

      /etc/inc/filter.inc will help you.

      cheers,

      1 Reply Last reply Reply Quote 0
      • M
        mastrboy
        last edited by Sep 3, 2008, 8:43 PM Sep 3, 2008, 8:24 PM

        thanks.. was hell going through 3000+ lines  :P

        But i solved my problem.. posting it here so maybe others looking for the same issue can resolve it too..

        NAT from GUI in PFsense did not redirect properly to my external transparent squid box, every log entry would show all traffic coming for the PFsense box, i did not want this, to fix:

        edit /etc/inc/filter.inc
        around line 623 add:

                # custom squid rules: 
                $natrules .= "no rdr on em1 inet proto tcp from any to 192.168.0.0/24 port 80\n";
                $natrules .= "rdr pass on em1 inet proto tcp from any to any port 80 -> 192.168.0.100 port 8080\n";
        

        Remember to change IP's, ports and interface names.

        If you use safesquid , you can not access its webconfig by just typing safesquid.cfg when it's in transparent mode, you can access the webconfig by:
        http://safesquid.cfg:$PORT/safesquid.cfg, in my case that would be http://safesquid.cfg:8080/safesquid.cfg
        You also have to add a dns entry for safesquid.cfg pointing to your proxy IP or else you wont be able to login to safesquid, not sure why…

        1 Reply Last reply Reply Quote 0
        • N
          nocer
          last edited by Sep 4, 2008, 12:55 AM

          Hehehe…now you know what you must see first, in fact, "$natrules" and "$ipfrules" is the key for the pfSense to create its own rules.
          There is also a copy of running rules, rules.debug in your /tmp. This helps you too.

          It is always the best way to sneak around the code, that will definitely help you understand how the pfSense works. ;)

          Happy hacking!  ;D

          BTW. 3000+ ??? mine is only 2912 lines;

          wc -l /etc/inc/filter.inc

          2912 /etc/inc/filter.inc

          I'm running 1.3-AA so there must have been some clean up of the code. :) :) :)

          @mastrboy:

          thanks.. was hell going through 3000+ lines  :P

          1 Reply Last reply Reply Quote 0
          • M
            mastrboy
            last edited by Sep 4, 2008, 9:35 AM

            running 1.2, nano counts the lines: [ line 1/3316 (0%), col 1/6 (16%), char 0/120318 (0%) ]

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              This community forum collects and processes your personal information.
              consent.not_received