Ask Your Question
2

How to set system proxy in Fedora 17?

asked 2012-06-05 13:09:45 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I noticed when changing proxies in System Settings -> Network it will not ask whether I wanted to make the proxy system-wide.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2012-06-05 15:14:36 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

It depends of the "concept" of System-wide. This will apply to Gnome or KDE applications depending on you GUI. If you wanna wget and other CLI related tools to work under the same proxy, you need to add/edit the http_proxy to your environment

Example

http_proxy="http://192.168.1.254:3128"
export http_proxy

put this on your .bashrc and it would be fine. For https and ftp, the variables are https_proxy and ftp_proxy

edit flag offensive delete link more

Comments

To make it really system wide (for all users!) put it in /etc/rc.d/rc.local (maybe you have to create that file). This file is executed on startup. I did not try it, but it should work. Maybe it is better to use /etc/bash.bashrc for this. Report back. :-)

erik gravatar imageerik ( 2013-03-07 06:23:30 -0500 )edit
0

answered 2012-06-12 13:31:44 -0500

freax gravatar image

Or you could click on the Network Symbol in the Taskbar => Network Settings => Network proxy and choose Manual here you can enter your proxy settings!

edit flag offensive delete link more
0

answered 2012-08-06 11:09:04 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I am new to Fedora, have not used it in years, but taking a look again because I am interested in KVM Spice.

I noticed that after I set the System Settings - Network - Network proxy addr to 127.0.0.1 and port to 3128....

If I go to a terminal session, to check the environment (env), I get the following output:

[zadmin@fbox01 ~]$ env
[..........lines removed.........]
NO_PROXY=localhost,127.0.0.0/8
[...................]
[...................]
http_proxy=http://127.0.0.1:3128/
[.....................]
ftp_proxy=http://127.0.0.1:3128/
FTP_PROXY=http://127.0.0.1:3128/
SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/19134,unix/unix:/tmp/.ICE-unix/19134
USERNAME=zadmin
ALL_PROXY=socks://127.0.0.1:3128/
all_proxy=socks://127.0.0.1:3128/
[.................]
HTTPS_PROXY=http://127.0.0.1:3128/
https_proxy=http://127.0.0.1:3128/
[......................]
no_proxy=localhost,127.0.0.0/8
GNOME_DESKTOP_SESSION_ID=this-is-deprecated
HTTP_PROXY=http://127.0.0.1:3128/
[............]
[zadmin@fbox01 ~]$

And also when I su to root and do the same I see this as output:

[root@fbox01 zadmin]# env
[.........]
NO_PROXY=localhost,127.0.0.0/8
http_proxy=http://127.0.0.1:3128/
[................]
FTP_PROXY=http://127.0.0.1:3128/
ftp_proxy=http://127.0.0.1:3128/
[....................]
https_proxy=http://127.0.0.1:3128/
HTTPS_PROXY=http://127.0.0.1:3128/
no_proxy=localhost,127.0.0.0/8
HTTP_PROXY=http://127.0.0.1:3128/
[...............]
XAUTHORITY=/root/.xauthk5Jtu4
COLORTERM=gnome-terminal
_=/usr/bin/env
[root@fbox01 zadmin]#

This is rather confusing to see all of the repeat proxy related entries in the environment, but... assuming that the last entry is used--which I am not sure of, this tells me that the system will use 127.0.0.1:3128 as the proxy...

Even though the environment is a little polluted, the desired proxy redirection does seem to be honored in the CLI.

I have set up cntlm to listen on default proxy 127.0.0.1:3128. I can run yum right through my corporate windows proxy server. I just did a 'yum install wireshark' and it worked perfectly.

Here is where I originally got the cntlm rpm, using another system: download.fedora.redhat.com/pub/fedora/linux/development/17/x8664/os/Packages/c/cntlm-0.92-2.fc17.x8664.rpm

The cntlm config file is /etc/cntlm.conf. You just put your domand and username in the config file--no password. Run 'cntlm -H' to get hashes and copy paste output. Place hashs output directly into the config file. Start cntlm and go!

I have used cntlm successfully on Ubuntu before, which is why I wanted to try it on Fedora. It works unbelievably great and you don't need to use a plaintext password in the configuration file. It is very easy to set up, but I had a problem running it in fedora using systemctl. As a temporary workaround I simply just invoke it as su root when I need a proxy connection for administration and command line use.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-06-05 13:09:45 -0500

Seen: 35,401 times

Last updated: Jan 13 '13