LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting network options & proxy in CentOS (https://www.linuxquestions.org/questions/linux-newbie-8/setting-network-options-and-proxy-in-centos-483076/)

LDJ 09-13-2006 08:32 AM

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.

unSpawn 09-13-2006 09:05 AM

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).

odcheck 09-13-2006 09:07 AM

do you also have a gateway entry in you ifcfg-eth0 ?


All times are GMT -5. The time now is 08:20 AM.