Connecting Raspberry Pi through school proxy

A post to file under ‘boringly technical’,  but it’s here for anyone in the same situation.

pi desktop

I’ve been struggling to get the Raspberry Pi to fully access the internet in my classroom as it has to connect through a proxy server. I have so far been able to connect through the browser by changing the proxy setting in Midori, but had no luck in enabling a connection that allowed for apt-get commands through the terminal. As with most things relating to the Pi this process was not intuitive, but all the more satisfying for requiring a bit of digging, thus extending my limited technical knowledge.

This lunch time I sat down determined to find the solution and, with the help of various forums and the Raspberry Pi User Manual I successfully managed to achieve a connection. (This is using a wired ethernet connection – I haven’t tested it over wifi). There may be a smarter way, but this is how I did it:

1. Setup a password for the root account by opening up a terminal and using the command: sudo passwd root

2. Restart the pi and login as user: root with your new password (logging in as root will allow you to alter the following file – user ‘pi’ does not have this privilege).


3. Navigate to the folder /etc/apt/apt.conf.d/ (You can do this by clicking the second icon along on the taskbar at the bottom of your desktop and typing in the location address).

4. Right click in the folder and create a new file called ’10proxy’.

5. Right click on the new file and edit it. Type in the following line:

Acquire::http::Proxy ““;

(obviously changing the bit in bold for your school’s proxy setting)

6. Save the file.

7. Restart the pi and log back in as user: pi   password: raspberry (or whatever your default user account is set as)

You should now find that you have full internet access. You can test by trying an update in the terminal:

sudo apt-get update

Done. Hurrah!


7 thoughts on “Connecting Raspberry Pi through school proxy

  1. hi,
    thank you for your interesting subject
    really i did what you explained literally but i couldn’t update my pi. do you have any suggestions for this problem?


    • Hi. Sorry for my delay in replying- your comment got lost among all of the spam I get!

      Hmmm… I’ve heard that this doesn’t work in some schools as they require proxy authentication, which this method doesn’t allow. If this is the case then I’m afraid I’m not much help…


  2. It works greatly,
    No need to reboot.
    For proxy authentification :
    Acquire::http::Proxy ““;

    You need to put “user:password” at the begin of the adress.

    I do this at work with my RPi.
    And of course … the proxy isn’t the same … and the port too



  3. Pingback: LAN on RPi2 not working | DL-UAT

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s