Jay Taylor's notes

back to listing index

Set a network range in the no_proxy environment variable

[web search]
Original source (unix.stackexchange.com)
Tags: bash shell-scripting proxy unix.stackexchange.com
Clipped on: 2017-10-25

I'm in a network using a proxy. I've got machines using lots of scripts here and there accessing each other over HTTP.

  • The network is 10.0.0.0/8.
  • My proxy is 10.1.1.1:81, so I set it up accordingly:

    export http_proxy=http://10.1.1.1:81/
  • I want to exclude my own range to be accessed with the proxy. I tried any combination available.

    export no_proxy='10.*'
    export no_proxy='10.*.*.*'
    export no_proxy='10.0.0.0/8'

None of the above work!

I'm testing with wget and it always tries to query the proxy, whatever IP address I want to connect to.

  • Since lots of scripts lie everywhere in all systems the --no-proxy option is actually not an option. I want to set it system wide.

Hot Network Questions

site design / logo © 2017 Stack Exchange Inc; user contributions licensed under cc by-sa 3.0 with attribution required. rev 2017.10.25.27568

Linux is a registered trademark of Linus Torvalds. UNIX is a registered trademark of The Open Group.

This site is not affiliated with Linus Torvalds or The Open Group in any way.