I'm trying to configure yum to use a proxy for all requests. So I added to /etc/yum.conf : proxy=http://proxy.domain.local:8080/yum is working correctly, but I can see in my iptable logs that yum is trying to connect directly on the internet : Jun 12 15:10:15 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10192.168.1.10DST=134.158.69.171 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=25672 DF PROTO=TCP SPT=50286 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:15 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=37.59.26.59 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=56269 DF PROTO=TCP SPT=40460 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:15 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=193.28.235.36 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=12752 DF PROTO=TCP SPT=57204 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:15 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=85.31.185.102 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=47458 DF PROTO=TCP SPT=37182 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:15 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=91.221.151.185 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=36666 DF PROTO=TCP SPT=52132 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:15 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=37.59.26.59 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=42449 DF PROTO=TCP SPT=40468 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:15 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=193.28.235.36 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=51726 DF PROTO=TCP SPT=57212 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:15 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=81.194.43.155 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=40522 DF PROTO=TCP SPT=37580 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:16 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=134.158.69.171 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=25673 DF PROTO=TCP SPT=50286 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:16 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=37.59.26.59 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=56270 DF PROTO=TCP SPT=40460 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:16 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=193.28.235.36 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=12753 DF PROTO=TCP SPT=57204 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:16 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=85.31.185.102 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=47459 DF PROTO=TCP SPT=37182 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:16 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=91.221.151.185 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=36667 DF PROTO=TCP SPT=52132 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:16 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=37.59.26.59 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=42450 DF PROTO=TCP SPT=40468 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:16 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=193.28.235.36 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=51727 DF PROTO=TCP SPT=57212 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:16 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=81.194.43.155 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=40523 DF PROTO=TCP SPT=37580 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:18 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=91.221.151.185 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=36668 DF PROTO=TCP SPT=52132 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:18 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=37.59.26.59 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=42451 DF PROTO=TCP SPT=40468 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:18 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=193.28.235.36 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=51728 DF PROTO=TCP SPT=57212 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0Jun 12 15:10:18 vm1 kernel: IPTABLES-rejet-output-tcp: IN= OUT=ens160 SRC=192.168.1.10DST=81.194.43.155 LEN=52 TOS=0x00 PREC=0x00 TTL=64 ID=40524 DF PROTO=TCP SPT=37580 DPT=80 WINDOW=29200 RES=0x00 SYN URGP=0I did set the http_proxy and https_proxy variable to solve this issue without luck :# set | grep proxyhttp_proxy=http://proxy.domain.local:8080https_proxy=http://proxy.domain.local:8080
CentOS 7 - yum not using proxy for all requests
centos;yum;proxy
I finally found why I had this issue : fastest mirror mirror is enabled by default and doesn't deal well with proxy.If I disable this plugin I don't have this.To disable this plugin just edit :/etc/yum/pluginconf.d/fastestmirror.confset enabled=0Hope this help.