Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: tuyapeni on January 31, 2011, 01:58:10 PM

Title: Configuring proxy settings on SME
Post by: tuyapeni 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?
Title: Re: Configuring proxy settings on SME
Post by: Stefano on January 31, 2011, 02:24:44 PM
hi, welcome here

please read here (http://wiki.contribs.org/SME_Server:Documentation:FAQ#Upstream_proxy_server_configuration) and remember to read carefully the documentation..
Title: Re: Configuring proxy settings on SME
Post by: tuyapeni 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?
Title: Re: Configuring proxy settings on SME
Post by: Stefano 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]
Title: Re: Configuring proxy settings on SME
Post by: tuyapeni 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/
Title: Re: Configuring proxy settings on SME
Post by: Stefano on February 02, 2011, 11:24:48 AM
this will work until you reboot yor server..

did you try what I suggested?
Title: Re: Configuring proxy settings on SME
Post by: tuyapeni on February 02, 2011, 11:57:52 AM
Yes, but it did not work. What if i write the command to /etc/profile?
Title: Re: Configuring proxy settings on SME
Post by: Stefano 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 :-)
Title: Re: Configuring proxy settings on SME
Post by: CharlieBrady 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?
Title: Re: Configuring proxy settings on SME
Post by: tuyapeni 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
Title: Re: Configuring proxy settings on SME
Post by: Stefano 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
Title: Re: Configuring proxy settings on SME
Post by: tuyapeni 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
Title: Re: Configuring proxy settings on SME
Post by: tuyapeni 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
Title: Re: Configuring proxy settings on SME
Post by: CharlieBrady 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
Title: Re: Configuring proxy settings on SME
Post by: Stefano 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) ;-)
Title: Re: Configuring proxy settings on SME
Post by: CharlieBrady on February 07, 2011, 03:46:34 PM
Charlie.. I've already posted the custom template (with a new db value) ;-)

I know you have - I was just suggesting that the custom template was not necessary. IOW, that there was a simpler solution available.
Title: Re: Configuring proxy settings on SME
Post by: Stefano on February 07, 2011, 03:52:58 PM
I know you have - I was just suggesting that the custom template was not necessary. IOW, that there was a simpler solution available.

maybe, but I prefer a custom template and new db values.. :-)
Title: Re: Configuring proxy settings on SME
Post by: tuyapeni on February 09, 2011, 08:01:41 AM
Thanks guys, i appreciate your assistance.