Jat421
Posts: 3
Joined: Sat Aug 04, 2012 2:57 am

corporate proxy

Wed Aug 08, 2012 5:05 pm

Hi, I am behind a firewall and use a proxy server to get to the internet. How can I set a proxy on Raspberry Pi?

I have already tried the following without success.
~bashrc file :
export http_proxy=http://username:[email protected]:port/

User avatar
computerpie
Posts: 57
Joined: Wed Jun 20, 2012 10:55 pm
Location: USA

Re: corporate proxy

Thu Aug 09, 2012 2:36 pm

As a network Admin I can't help responding to this. :)

When it comes to corp proxies there isn't a 1 size fits all answer to this question. Proxies can be done with hardware and/or software many companies use both. With a little googling you can find an answer, but since it is relatively easy to defeat a proxy most IT dept's have other means of protecting and monitoring network access.

In most cases if a company has gone through the trouble of setting up a proxy they are also strictly monitoring network access.

If you are planning to take your pi to work and hook it up or have already done that I assure you that it has been detected or will be shortly after you plug it in or connect it.

If someone plugs/connects an unapproved device into our network multiple alarms will go off and pinpoint the exact location that device is. Our policy is that anyone caught using unapproved devices/software on our network is subject to immediate termination and the device is subject to confiscation.

I'm not sure what your intentions are with this question or anyone else reading this thread nor am I implying anything, just be aware if you think it would be cool or fun to take your raspi to work and play with it or show it off it might end with not so Fun results.

If you are a network admin then consult you proxy documentation or tech support and you should find out how to setup proxy access for any platform.
Pi1>OS: Rasbian Pi2>OS:Xbian .63
1:HDMI>>DVI>>Flat Screen Monitor
2: HDMI>>Toshiba 37" LCD
1:ASUS Wired USB Keyboard and Mouse
2:Logitech wireless mouse, CEC remote
SanDisk SDHC C4 8GB SD

User avatar
Jim JKla
Posts: 2219
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: corporate proxy

Thu Aug 09, 2012 3:02 pm

I would say it's probably a good idea you dicuss with your IT Admin they may even have a safe way of connecting new hardware.
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

User avatar
RaTTuS
Posts: 10139
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: corporate proxy

Thu Aug 09, 2012 3:04 pm

computerpie wrote:As a network Admin I can't help responding to this. :)
If someone plugs/connects an unapproved device into our network multiple alarms will go off and pinpoint the exact location that device is. Our policy is that anyone caught using unapproved devices/software on our network is subject to immediate termination and the device is subject to confiscation.
...
also working in IT
I 2nd this ,
however sometimes our alarms will respond to the wrong place.
however it's best if you go and as your local friendly IT manager...

I also suggest that beer , cake, chocolate or cash can help with the process [delete as you see fit - usually all will help]
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

User avatar
computerpie
Posts: 57
Joined: Wed Jun 20, 2012 10:55 pm
Location: USA

Re: corporate proxy

Thu Aug 09, 2012 3:10 pm

Jim JKla wrote:I would say it's probably a good idea you dicuss with your IT Admin they may even have a safe way of connecting new hardware.
If you show them the board they might want to get their own and then you'd have someone to talk pi projects with. :)

I'm enjoying mine. :D
Pi1>OS: Rasbian Pi2>OS:Xbian .63
1:HDMI>>DVI>>Flat Screen Monitor
2: HDMI>>Toshiba 37" LCD
1:ASUS Wired USB Keyboard and Mouse
2:Logitech wireless mouse, CEC remote
SanDisk SDHC C4 8GB SD

widelord
Posts: 26
Joined: Thu Jul 12, 2012 8:50 am
Location: Oldham, GB

Re: corporate proxy

Thu Aug 09, 2012 10:38 pm

Speaking as a network admin I would most definitely agree - talk to your IT dept first before plugging your Pi into the corp network. Although I'm pretty sure that if anybody bought their RPi to my office I would probably confiscate it for some 'testing' first!

And yes cake/biscuits(nice ones with chocolate involved)/doughnuts will always help!

User avatar
Jim JKla
Posts: 2219
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: corporate proxy

Thu Aug 09, 2012 10:41 pm

Sounds like you worked in an IT department like the one I did cake was the preferd bribe. :)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

widelord
Posts: 26
Joined: Thu Jul 12, 2012 8:50 am
Location: Oldham, GB

Re: corporate proxy

Fri Aug 10, 2012 10:07 am

We always liked the doughnuts!

It was a proper IT department, located in an old office miles away from anybody else behind the buildings heating boiler! Many a long day spent 'testing' things, finding out how long hard drives would run without the covers on, stress testing Pentium CPUs without their heatsinks and fans to see how long it took for the mysterious black smoke to be released!

Those were the days!

Hmmm - just realised my location is on the right hand side - well, if you ever bought cheap wallpaper there from a 'budget' DIY shop who had an elephant for their logo (or one of the other branches around the country) then that was the company I worked for!

jkflying
Posts: 4
Joined: Mon Aug 13, 2012 2:50 pm

Re: corporate proxy

Mon Aug 13, 2012 3:00 pm

I have the same issue - I have a university proxy (and I've checked that it's not an issue plugging the PI in). You guys haven't really answered his question - the export http_proxy=http://proxyname:port should be enough.

I copied cntlm on with a flash drive, set everything up and tested that it is connecting to the proxy correctly.
But, no matter what I try, apt-get won't honor my proxy settings to look at my local cntlm server. I've tried using apt proxy enabling config files AND http_proxy environment variables. This is on the default Raspbian image. The R3 Raspbian image from the raspbian website works fine, and wget picks up the proxy settings and works fine so I know my settings are right. Any reason you guys can think of that the apt-get wouldn't work but wget would?

User avatar
pbinks
Posts: 2
Joined: Thu Sep 13, 2012 7:16 pm

Re: corporate proxy

Mon Sep 17, 2012 11:56 am

I've successfully used the "http_proxy" setting with suitable parameters to allow the qemu Raspberry Pi to get through our corporate network and apt-get works as expected.
I've no tried a read machine yet but this should respond in the same way (it does using real hardware and proxy settings at home).

Binky

vallesasecas
Posts: 6
Joined: Mon Oct 29, 2012 6:39 am

Re: corporate proxy

Wed Nov 07, 2012 5:52 am

I´ve been following the post since two weeks ago and in my case my company uses NTLM proxy, its easy to configure that kind of proxies using ntlmaps.

msmithy12
Posts: 94
Joined: Fri Aug 10, 2012 8:57 am

Re: corporate proxy

Tue Feb 19, 2013 1:34 pm

i used a raspberry pi for a work project, and was told i couldn't connect it to our company network for 'security reasons' so i have been working with a WIFI hotspot for the last 7months to complete my tasks. IT people spoil all the fun!

Our IT policy states all computers must run windows xp/vista/7. We cant even use macs never mind linux. I can only assume all those mac and linux specific viruses would ruin the companies network! :D
I assume I know what I`m talking about... I probably don`t

Home: 256mb Made in UK, Rasbmc, 40" Sony Bravia KDL-40v3000
Work: 2b+, Rasbian, 6" Lilliput touchscreen

rusty50
Posts: 3
Joined: Thu May 30, 2013 6:13 pm

Re: corporate proxy

Mon Nov 04, 2013 4:44 pm

I realize this is an old post.. but here is another solution.
In addition to setting http_proxy=<PROXY_IP>:<PROXY_PORT>
You can permanently set it for apt-get by creating a file in /etc/apt/apt.conf.d
In my case I created a file called "80proxy" with the following contents.

Acquire::http::proxy "http://<PROXY_IP>:<PROXY_PORT>/";

-rusty

yungroobz
Posts: 23
Joined: Wed Nov 26, 2014 11:10 am

Re: corporate proxy

Mon Jan 19, 2015 4:45 pm

@jkflying I was using RPi through cntlm proxy on my university campus. I could access the web but could not perform apt-get. The problem was that I had special characters in my password. Hope that helps!

PS to anyone who is still interested, once I configured cntlm to do my bidding with ethernet, I subsequently wanted to use a wifi dongle. I have a feeling all my cntlm settings are getting in the way if wlan. Is this plausible? I get the (very very brief flash of an) error message: failed to initiate AP scan. It seems that wpa_gui is picking up about 3 of the routers all with the same ssid. Suggestions to fix?

Thanks

User avatar
Nfarrow
Posts: 48
Joined: Sat Dec 20, 2014 1:24 am
Location: Oklahoma, USA
Contact: Website Facebook Twitter YouTube

Re: corporate proxy

Thu Oct 15, 2015 11:53 pm

I use this little script to turn on and off my proxy. Just save it as proxy.sh. and your proxy setting in, "/home/$USER/proxy.info"

Code: Select all

OFFP()
        {
                #turn off proxy
                sudo chmod 775 /etc/apt/apt.conf.d/10proxy
                sudo cat /dev/null > /etc/apt/apt.conf.d/10proxy
              export http_proxy="::"
              export https_proxy="::"

        }

 ONP()
        {
                #turn on proxy
              sudo cp /home/$USER/proxy.info /etc/apt/apt.conf.d/10proxy
              export http_proxy="http://<PROXY_IP>:<PROXY_PORT>"
              export https_proxy="http://<PROXY_IP>:<PROXY_PORT>"
        }

 VIEWP()
        {
                #View Proxy
                sudo cat /etc/apt/apt.conf.d/10proxy
        }
# MAIN BODY OF SCRIPT
#
# Present the menu selection to the user

        echo " Proxy settings"
        PS3="Please select a numeric option:  "
        select option in ProxyOFF ProxyON ProxyView Exit

        do
             case "$option"
                        in
                                Display_ALL    )  DPLYALL;;
                                ProxyOFF    )  OFFP;;
                                ProxyON    )  ONP;;
                                ProxyView    )  VIEWP;;
                                Exit         )  exit 0;;
                                *            )  echo "Invalid selection ! ";;
                       esac
       done
Twitter: @farrownick
Instagram veggievampire
I own a lot of Pis....

Return to “General discussion”