Koozali.org: home of the SME Server

Configuring proxy settings on SME

Offline tuyapeni

  • *
  • 9
  • +0/-0
Configuring proxy settings on SME
« on: January 31, 2011, 01:58:10 PM »
I do not have a direct connection to the internet, i need to specify the proxy setting before i can connect to the internet. Where do i specify this on SME server for me to have internet connection? Is there perhaps a config file that i must modify?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Configuring proxy settings on SME
« Reply #1 on: January 31, 2011, 02:24:44 PM »
hi, welcome here

please read here and remember to read carefully the documentation..

Offline tuyapeni

  • *
  • 9
  • +0/-0
Re: Configuring proxy settings on SME
« Reply #2 on: January 31, 2011, 03:31:01 PM »
Thanks Stefano,

How do you specify the user name and password so that it doesnt prompt me for one?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Configuring proxy settings on SME
« Reply #3 on: January 31, 2011, 03:43:49 PM »
hi..

Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/squid/squid.conf
cp /etc/e-smith/templates/etc/squid/squid.conf/10ParentCache /etc/e-smith/templates-custom/etc/squid/squid.conf/

edit /etc/e-smith/templates-custom/etc/squid/squid.conf/ in this way:

Code: [Select]
{
 $OUT = "";
 if (defined $SquidParent && $SquidParent)
 {
 $OUT .= "cache_peer $SquidParent parent ";
 $OUT .= $SquidParentPort || "3128";
 $OUT .= " 7 no-query default";
 $OUT .= " login=$SquidUser";
 }
}

then

Code: [Select]
db configuration set SquidUser username:password
expand-template /etc/squid/squid.conf
signal-event proxy-update
signal-event post-upgrade; signal-event reboot

not tested, should work, let me know
[/code]

Offline tuyapeni

  • *
  • 9
  • +0/-0
Re: Configuring proxy settings on SME
« Reply #4 on: February 02, 2011, 11:17:02 AM »
Hi Stefano,

This is what i used and it worked. I ran the following command: Export ftp_proxy=http://username@192.168.0.0:3128/

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Configuring proxy settings on SME
« Reply #5 on: February 02, 2011, 11:24:48 AM »
this will work until you reboot yor server..

did you try what I suggested?

Offline tuyapeni

  • *
  • 9
  • +0/-0
Re: Configuring proxy settings on SME
« Reply #6 on: February 02, 2011, 11:57:52 AM »
Yes, but it did not work. What if i write the command to /etc/profile?

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Configuring proxy settings on SME
« Reply #7 on: February 02, 2011, 12:03:00 PM »
Yes, but it did not work.

WHAT did not work? any evidence of the problem in the logs?

Quote
What if i write the command to /etc/profile?

this is not the SME's way :-)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Configuring proxy settings on SME
« Reply #8 on: February 02, 2011, 06:51:45 PM »
This is what i used and it worked. I ran the following command: Export ftp_proxy=http://username@192.168.0.0:3128/

That seems like a strange address to use - 192.168.0.0 is not usually considered a valid host address.

I'm guessing you have used the above on a command line on a linux workstation, and you then executed some command which does ftp net access. Or are you doing it on the SME server command line, and then executing 'yum' to update your system?

Offline tuyapeni

  • *
  • 9
  • +0/-0
Re: Configuring proxy settings on SME
« Reply #9 on: February 07, 2011, 09:38:05 AM »
The IP is just an example that i used. I am using it on the SME server command line, then execute yum to update the system

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Configuring proxy settings on SME
« Reply #10 on: February 07, 2011, 10:04:39 AM »
Colud you please tell us what did not work with the suggestion I gave you?

thank you

Offline tuyapeni

  • *
  • 9
  • +0/-0
Re: Configuring proxy settings on SME
« Reply #11 on: February 07, 2011, 10:20:27 AM »
Hi Guys,

I hope i am not frustrating you guys, i come from a windows background and have little knowledge of CentOs. I have done as per instruction given by Sefano, but i only get internet connection when i run this command: Export ftp_proxy=http://username@192.168.0.0:3128/. I would also like to upgrade my freepbx to version 2.5.0 or higher, please assist me on this regard aswell.

Module Administration
 
Errors with selection:
Core cannot be installed:
FreePBX version 2.5.0rc3 or higher is required, you have 2.2.0beta3
Please try again after the dependencies have been installed
 
Thanks

Offline tuyapeni

  • *
  • 9
  • +0/-0
Re: Configuring proxy settings on SME
« Reply #12 on: February 07, 2011, 01:46:02 PM »
I managed to upgrade the freepbx to ver 2.8.2, here is the procedure:

cd /usr/src/
wget http://mirror.freepbx.org/freepbx-2.8.1.tar.gz
tar zxvf freepbx-2.8.1.tar.gz
cd freepbx-2.8.1
./start_asterisk start # for upgrades use: amportal start
./install_amp

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Configuring proxy settings on SME
« Reply #13 on: February 07, 2011, 03:10:11 PM »
The IP is just an example that i used.

Please do not mislead us by giving us false information.

Quote
I am using it on the SME server command line, then execute yum to update the system

OK, that would explain why Stefano's suggestion does not work - yum is not configured to use squid for outbound connections, although there is an open New Feature Request to make that change:

http://bugs.contribs.org/show_bug.cgi?id=2407

Stefano, squid could be configured without a custom template, via:

config set SquidParentPort "3128 login=username:password"
expand-template /etc/squid/squid.conf
sv t /service/squid

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Configuring proxy settings on SME
« Reply #14 on: February 07, 2011, 03:41:47 PM »
OK, that would explain why Stefano's suggestion does not work - yum is not configured to use squid for outbound connections, although there is an open New Feature Request to make that change:

http://bugs.contribs.org/show_bug.cgi?id=2407

Is there any reason why it is not in the core package? I mean.. if the proposed soution works, why it's not already in production? (no flaming at all)

Quote
Stefano, squid could be configured without a custom template, via:

config set SquidParentPort "3128 login=username:password"
expand-template /etc/squid/squid.conf
sv t /service/squid


Charlie.. I've already posted the custom template (with a new db value) ;-)