LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-14-2008, 12:33 PM   #1
petestaar
LQ Newbie
 
Registered: Jan 2008
Posts: 2

Rep: Reputation: 0
Global proxy setting


Hello..

I work from behind a proxy server, and I can't manage to get the proxy settings work in Mepis 7. This means I can't use the package manger and apt-get install. I can browse the web though, by setting proxy settings in Firefox.

I have tried to setup a HTTP and FTP proxy in KDE 'control center' ->'Internet & Network'->'Proxy'->'Man. specify proxy settings'.

This however have no effect. I can man. setup proxy settings for every application that uses a HTTP/FTP connection.

Is there any other way to specify any global proxy settings in Mepis?
 
Old 02-15-2008, 06:02 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I only know the distro-agnostic way of setting up proxy env vars and for a shell like BaSH which sources /etc/profile that is to add them to a resource in /etc/profile.d/. Create a file called /etc/profile.d/proxy.sh and give it octal rights 0644. These should be the contents:
Code:
L_UID=`grep ^UID_MIN /etc/login.defs 2>/dev/null|awk '{print $2}'`; [ -z $L_UID ] && L_UID=500
if [ `id -g` -ge $L_UID ]; then
 export FTP_PROXY=http://127.0.0.1:8080/
 export HTTP_PROXY=http://127.0.0.1:8080/
 export HTTPS_PROXY=http://127.0.0.1:8080/
 #export NO_PROXY=10.10.1.0
fi
The L_UID is to avoid giving system users proxy env. If you need it comment out the first, second and last line. Replace "127.0.0.1:8080" with the address you use. Log out of your account and back in. Open a terminal window and type 'env' to check.
 
Old 11-10-2011, 09:06 PM   #3
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
Code:
L_UID=`grep ^UID_MIN /etc/login.defs 2>/dev/null|awk '{print $2}'`; [ -z $L_UID ] && L_UID=500
if [ `id -g` -ge $L_UID ]; then
 export FTP_PROXY=http://127.0.0.1:8080/
 export HTTP_PROXY=http://127.0.0.1:8080/
 export HTTPS_PROXY=http://127.0.0.1:8080/
 #export NO_PROXY=10.10.1.0
fi
Hello.
Seems strange, this advice doesn't work for me.

I tried several variants in the script:

export HTTP_PROXY=http://127.0.0.1:8080/
export HTTP_PROXY=http://proxy.server.fqdn:8080/
export HTTP_PROXY=proxy.server.fqdn:8080

but the are no logs from my IP address in the proxy log file. When I set it manually in browser, the traffic starts going through the proxy, so it [proxy] works fine.

What's wrong?!

Last edited by Lexus45; 11-10-2011 at 09:09 PM.
 
Old 11-12-2011, 11:47 AM   #4
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
Well, what I've found:
if we set the global proxy through Bash, not all programs will "see" this settings. And even if we do it via GNOME global proxy settings, the result may be the same. :-)
 
Old 11-13-2011, 12:35 PM   #5
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
Proxies generally work in distros as long as they are simple. Proxy.pac files have never worked and you have to manually find the proxy address and port and put it in each app.

Be warned that companies block a lot of that and might not be too happy you are trying it on their system.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting global varible Corrado Linux - Software 3 03-05-2007 02:24 PM
Stop users using any global Ips of proxy thinker Linux - Networking 1 12-17-2006 02:49 AM
Setting Global Konqueror Background Neruocomp Linux - Software 1 09-11-2005 09:27 PM
global proxy server for internet LancerNZ Linux - Networking 1 03-12-2005 03:03 AM
Setting global system variables AzidStar Linux - Newbie 5 03-11-2005 09:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration