CentOS 7 and GNOME Terminal proxy settings

Issues related to configuring your network
Post Reply
georgelappies
Posts: 16
Joined: 2017/01/15 09:04:33

CentOS 7 and GNOME Terminal proxy settings

Post by georgelappies » 2017/07/11 07:49:01

Good day friends of CentOS

I have a bit of a problem, I am behind a WebMarshal authenticating proxy. The proxy settings is setup correctly in the GUI network screen and apps like Firefox detects it and works.

I also edited my /etc/yum.conf to add the proxy settings and yum works, but for the life of me I can't get GNOME Terminal to read the proxy settings and authenticate.

what I have tried and entered into ~/.profile ~/.bash_profile and ~/.bashrc is:

Code: Select all

http_proxy="http://username:password@192.168.0.253:8080/"
export http_proxy
My resolve.conf also have the correct DNS settings set. but terminal apps like curl, wget ssh, ping etcetera fails to work and gives:

Code: Select all

ping: www.google.com: Name or service not known
The dig commands gives this:

Code: Select all

[georgel@centosdevbox1 ~]$ dig www.google.com

; <<>> DiG 9.9.4-RedHat-9.9.4-50.el7_3.1 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 25328
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4000
;; QUESTION SECTION:
;www.google.com.			IN	A

;; Query time: 5506 msec
;; SERVER: 192.168.0.7#53(192.168.0.7)
;; WHEN: Tue Jul 11 09:51:53 SAST 2017
;; MSG SIZE  rcvd: 43
nslookup gives this:

Code: Select all

[georgel@centosdevbox1 ~]$ nslookup www.google.com
;; Got SERVFAIL reply from 192.168.0.7, trying next server
;; Got SERVFAIL reply from 192.168.0.8, trying next server
;; connection timed out; trying next origin
Server:		192.168.0.7
Address:	192.168.0.7#53

** server can't find www.google.com: NXDOMAIN
Please help.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 and GNOME Terminal proxy settings

Post by TrevorH » 2017/07/11 09:40:08

Your problem is that none of ping or dig or nslookup *use* a proxy. Proxies are used by e.g. firefox or yum or curl or wget. You cannot ping names that are on the other side of a proxy as ping is not proxy aware.

Set your proxy details then try running curl http://www.google.com and see if that works. Or try yum update
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

georgelappies
Posts: 16
Joined: 2017/01/15 09:04:33

Re: CentOS 7 and GNOME Terminal proxy settings

Post by georgelappies » 2017/07/11 10:29:32

TrevorH wrote:Your problem is that none of ping or dig or nslookup *use* a proxy. Proxies are used by e.g. firefox or yum or curl or wget. You cannot ping names that are on the other side of a proxy as ping is not proxy aware.

Set your proxy details then try running curl http://www.google.com and see if that works. Or try yum update
Great, thanks. wget and curl both worked.

Post Reply