LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-13-2006, 08:32 AM   #1
LDJ
Member
 
Registered: Nov 2004
Posts: 81

Rep: Reputation: 15
Setting network options & proxy in CentOS


Ive done a minimal install of CentOS (so no GUI!) just to play with and now i'm trying to set up the NIC. The only problem is, having assigned an IP address and the subnet mask, how do I configure the proxy settings? I can ping our DNS server but cannot ping anything externally (obviously!).

Im quite new to Linux so dont really know where these are set?

Thanks for any info.
 
Old 09-13-2006, 09:05 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,338
Blog Entries: 55

Rep: Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538Reputation: 3538
How do I configure the proxy settings?
CLI apps like lynx, elinks, wget can be configured globally (/etc/appname config file) or individually (~/.appname config file) for that. Most of them can detect and use environment variables (PROTO_PROXY=).
Here's one way to set them globally using environment variables:
- create executable file /etc/profile.d/local.sh (presuming default Bash shell)
- add contents:
Code:
local s
# UID_MIN="500"
# if [ "$(id -u)" -ge "${UID_MIN}" ]; then
 PROXYADDR="http://127.0.0.1:8080/"
 for s in HTTP HTTPS FTP GOPHER NEWSPOST NEWSREPLY NEWS NNTP\
 SNEWSPOST SNEWSREPLY SNEWS WAIS FINGER CSO; do
  export ${s}_PROXY=${PROXYADDR}
done
# fi
This covers about all the vars I know of. Uncomment the lines to make settings available to only human and not privileged system users (see /etc/login.defs).
 
Old 09-13-2006, 09:07 AM   #3
odcheck
Member
 
Registered: Aug 2006
Distribution: Fedora, CentOS, RHEL, Debian
Posts: 978

Rep: Reputation: 30
do you also have a gateway entry in you ifcfg-eth0 ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
squid proxy server configuration & distribution of internet without proxy gaurav_gupta082 Linux From Scratch 2 07-31-2010 11:25 AM
Setting network interface to use on CentOS kgoth Linux - Networking 1 12-10-2005 04:30 AM
setting up network (proxy settings) sharadbirmiwal Linux - Networking 1 01-27-2005 08:04 AM
Setting up a proxy & firewall mayordc Red Hat 3 11-24-2004 10:23 AM
Need help setting up the Host & network files. hitbob Linux - Networking 4 08-22-2003 03:45 AM


All times are GMT -5. The time now is 02:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration