Koozali.org: home of the SME Server

Bypass Proxy error?

Offline kryptos

  • *****
  • 245
  • +0/-0
Bypass Proxy error?
« on: October 27, 2008, 07:02:21 AM »
Hi All,

I followed this link http://wiki.contribs.org/Firewall#Bypass_Proxy but i have encountered an error when expanding the template I already downloaded the two fragments 35transproxy and 90adjustTransProxy. See details below:

Quote
[root@cbc-secure masq]# config setprop squid BypassProxyFrom 192.168.1.212
[root@cbc-secure masq]# expand-template /etc/rc.d/init.d/masq
ERROR in /etc/e-smith/templates-custom//etc/rc.d/init.d/masq/90adjustTransProxy: Program fragment delivered error <<syntax error at /      etc/e-smith/templates-custom//etc/rc.d/init.d/masq/90adjustTransProxy line 52, near "...
if">> at template line 1
ERROR: Template processing failed for //etc/rc.d/init.d/masq: 1 fragment generated errors
 at /sbin/e-smith/expand-template line 45

I'm currently using dansguardian with this server with SME 7.3.
uname -a
Linux cbc-secure 2.6.9-67.0.1.EL #1 Wed Dec 19 15:50:25 EST 2007 i686 i686 i386 GNU/Linux





Regards,
Rocel
« Last Edit: October 27, 2008, 07:20:43 AM by kryptos »

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
Re: Bypass Proxy error?
« Reply #1 on: October 27, 2008, 12:12:56 PM »
this is a good place to start looking
i think it just need a #

syntax error at /      etc/e-smith/templates-custom//etc/rc.d/init.d/masq/90adjustTransProxy line 52, near "...

Offline akhilmathema

  • ***
  • 42
  • +0/-0
Re: Bypass Proxy error?
« Reply #2 on: October 27, 2008, 01:01:15 PM »
Make sure the following lines are not repeated in your 90adjustTransProxy

if (defined $squid{BypassProxyFrom})
 {
  my $bypassproxyfrom = $squid{BypassProxyFrom};
  foreach my $bypasssource (split(',', $bypassproxyfrom))
  {
  $OUT .= " /sbin/iptables --table nat --append $pf_chain\\\n";
  $OUT .= "                --source $bypasssource --jump RETURN\n";
  }
 }

If repeated, just comment them out!

Offline mmccarn

  • *
  • 2,657
  • +10/-0
Re: Bypass Proxy error?
« Reply #3 on: October 27, 2008, 04:06:07 PM »
There was a missing "#" in 90adjustTransProxy.

I've added the missing #, uploaded the new version as an attachment to the bug, and updated the wiki to point to the new attachment number.

If you haven't already fixed it, you can re-run the install instructions from the wiki page and you'll get the new version.

- Michael

Offline mmccarn

  • *
  • 2,657
  • +10/-0
Re: Bypass Proxy error?
« Reply #4 on: October 27, 2008, 04:15:51 PM »
Also, if you're using the Dungog Dansguardian contrib, I think that already includes some proxy bypass functionality that you can configure through server-manager...


Offline kryptos

  • *****
  • 245
  • +0/-0
Re: Bypass Proxy error?
« Reply #5 on: October 28, 2008, 02:39:28 AM »
Hi all

I download again the files and now working fine. Im using the dansguardian the free one.Thanks!


Regards,
Rocel
« Last Edit: October 28, 2008, 02:44:34 AM by kryptos »