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

    Squidreverse (squid3): problem after each ip change!

    Scheduled Pinned Locked Moved pfSense Packages
    4 Posts 2 Posters 1.3k 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
      dneuhaeuser
      last edited by

      Hallo!

      I have a small but annoying problem with the squidreverse function of squid3 package (version 3.1.20 pkg 2.0.5_3) on pfsense 2.0.1 (i386).

      After a WAN ip change the new interface ip address for squidreverse isn't written to the config.

      I think in the proxy config file this line should be automatically updated:

      # Reverse Proxy settings
      https_port xxx.xxx.xxx.xxx:443 …

      At the moment I have to re-save the reverse proxy config after each ip change to compensate for this.

      Any help or workaround is appreciated!

      Thanks
      Dennis

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        @dneuhaeuser:

        At the moment I have to re-save the reverse proxy config after each ip change to compensate for this.

        same point as postfix

        That's because config files are created during "save" on gui.

        did you tried to reboot it at 03:00 as an workaround?

        Another way could be a php script that calls package_sync feature.

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • D
          dneuhaeuser
          last edited by

          I finally came up with this patch:

          
          --- /usr/local/pkg/squid.inc  2013-02-16 22:18:34.000000000 +0100
          +++ /usr/local/pkg/squid.inc  2013-02-17 16:10:11.000000000 +0100
          @@ -1793,6 +1793,23 @@
                  $rc = array();
                  $rc['file'] = 'squid.sh';
                  $rc['start'] = <<<eod<br>+
          +{$squid_local_base}/sbin/squid -k shutdown -f {$squid_conffile_var}
          +sleep 5
          +
          +/usr/bin/env \
          +PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
          +/usr/local/bin/php -q -d auto_prepend_file=config.inc <<endoff<br>++       require_once("globals.inc");
          +       require_once("functions.inc");
          +       require_once("pkg-utils.inc");
          +       require_once("squid.inc");
          +       require_once("squid_reverse.inc");
          +       squid_resync();
          +?>
          +ENDOFF
          +
           if [ -z "`ps auxw | grep "[s]quid "|awk '{print $2}'`" ];then
                  {$squid_local_base}/sbin/squid -f {$squid_conffile_var}
           fi</endoff<br></eod<br> 
          

          that works very well for me.
          on each package restart squid is resynced now (the config is rewritten)
          so I always have the correct WAN IP for reverse proxy in my config.

          perhaps something like this can be integrated in the next release…

          -- Dennis

          1 Reply Last reply Reply Quote 0
          • marcellocM
            marcelloc
            last edited by

            Maybe a "force package resync on restart" option on gui could help on it.

            Treinamentos de Elite: http://sys-squad.com

            Help a community developer! ;D

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