+ Post New Thread
Results 1 to 8 of 8
CLEO Thread, Raspberry Pi connecting to Proxy server in Regional Broadband Consortiums (RBC); Hello all, Has anyone been able to connect to their Raspberry Pi's to the Network so that the 'sudo apt-get ...
  1. #1
    tudorcrisp's Avatar
    Join Date
    Apr 2009
    Location
    Penrith
    Posts
    80
    Thank Post
    35
    Thanked 5 Times in 5 Posts
    Rep Power
    11

    Raspberry Pi connecting to Proxy server

    Hello all,

    Has anyone been able to connect to their Raspberry Pi's to the Network so that the 'sudo apt-get update' command works?
    I have followed some advice found online which enables me to point the Raspberry Pi to the Cache box and it appears to work, however when I run the update I get about 6% through before it fails citing that it cannot connect to the mirror sites.

    Is it a case that the address is being blocked by CLEO or have I missed something? Has anyone managed to connect the Raspberry Pi, who is still receiving their Internet connection through CLEO?

    Thanks

    Nick

  2. #2

    Join Date
    Nov 2010
    Posts
    444
    Thank Post
    58
    Thanked 67 Times in 58 Posts
    Rep Power
    27
    <checks notes>

    Have you created /etc/apt/apt.conf to contain the line

    Code:
    Acquire::http::Proxy "http://proxy url:port";
    (change as appropriate)?
    Last edited by mats; 7th May 2013 at 03:41 PM.

  3. Thanks to mats from:

    tudorcrisp (8th May 2013)

  4. #3
    tudorcrisp's Avatar
    Join Date
    Apr 2009
    Location
    Penrith
    Posts
    80
    Thank Post
    35
    Thanked 5 Times in 5 Posts
    Rep Power
    11
    I created a file in the following location

    /etc/apt/apt.conf.d/10proxy

    which contains the above piece of code. Should this be in another file?

  5. #4

    Join Date
    Feb 2009
    Posts
    149
    Thank Post
    0
    Thanked 36 Times in 35 Posts
    Rep Power
    18
    I used the following forum post to get it working for me Raspberry Pi &bull; View topic - Connect Raspi to a Proxy, you have to add the proxy details to two locations, the file you have already created and the /etc/environment file.

  6. Thanks to HilcrRWise from:

    tudorcrisp (14th May 2013)

  7. #5
    tudorcrisp's Avatar
    Join Date
    Apr 2009
    Location
    Penrith
    Posts
    80
    Thank Post
    35
    Thanked 5 Times in 5 Posts
    Rep Power
    11
    I have configured the two files and still no joy. I found another thread that told me to put this command into the terminal prompt and this works

    Code:
    sudo apt-get -o Acquire::http::proxy="http://proxyurl:port" update
    I guess I just need to find the right file to input the Acquire command
    Last edited by plexer; 25th March 2014 at 11:29 AM.

  8. #6

    Join Date
    Feb 2009
    Posts
    149
    Thank Post
    0
    Thanked 36 Times in 35 Posts
    Rep Power
    18
    Did you include a slash (/) at the end of the proxy url, after the port number, before the last ". If I remember correctly it wouldn't work for me until I added the slash at the end.

  9. #7

    jinnantonnixx's Avatar
    Join Date
    Mar 2011
    Location
    In the Calamatorium.
    Posts
    1,970
    Thank Post
    113
    Thanked 490 Times in 336 Posts
    Blog Entries
    2
    Rep Power
    283
    We did something that allows the kids to log-in with their username and connect to the proxy using their credentials

    Alter the /home/pi/.profile so that when the Pi starts up, the pupil 'logs in' (not really, but it looks like it's logging in) and their user and password is set via export, then fires up the GUI with startx.

    See if this is of help.

    The additional code is shown in red text.

    Code:
    # ~/.profile: executed by the command interpreter for login shells.
    # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
    # exists.
    # see /usr/share/doc/bash/examples/startup-files for examples.
    # the files are located in the bash-doc package.
    
    # the default umask is set in /etc/profile; for setting the umask
    # for ssh logins, install and configure the libpam-umask package.
    #umask 022
    
    # if running bash
    if [ -n "$BASH_VERSION" ]; then
        # include .bashrc if it exists
        if [ -f "$HOME/.bashrc" ]; then
         . "$HOME/.bashrc"
        fi
    fi
    
    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
    fi
    
    clear
    echo "Please enter your school username: "
    read username
    echo "Please enter your password: "
    read -s password
    export http_proxy="http://YOUR_DOMAIN\\$username:$password@YOUR_PROXY_SERVER:YOUR_PROXY_PORT/"
    startx
    Last edited by jinnantonnixx; 14th May 2013 at 04:44 PM.

  10. #8
    Griff's Avatar
    Join Date
    Feb 2009
    Location
    Bedfordshire
    Posts
    518
    Thank Post
    203
    Thanked 95 Times in 77 Posts
    Rep Power
    38
    Old thread I know but I just got this proxy stuff working on my Pi at school and thought I would post the steps I used to get it doing

    OS: 2014-01-07-wheezy-raspbian

    Launch LXTerminal

    1. sudo nano /etc/apt/apt.conf.d/10proxy

    2. Acquire::http::Proxy "http:\\yourpoxy:yourport\";

    3. Ctrl X to exit - Press Y to save and press enter make sure the filename is 10proxy

    4. Run sudo apt-get update and watch it update!

    Note it is case sensitive and make sure to include the / after the proxy port and also the ; after the close quotations

SHARE:
+ Post New Thread

Similar Threads

  1. Raspberry Pi connecting to Wireless
    By Divaldo in forum Raspberry Pi, Arduino & Other SBCs
    Replies: 6
    Last Post: 5th October 2012, 09:54 AM
  2. linux router to connect kindle to proxy server
    By tmcd0035 in forum Wired Networks
    Replies: 3
    Last Post: 2nd February 2012, 12:14 PM
  3. Log When Laptops Connect to The Server
    By nawbus in forum Network and Classroom Management
    Replies: 1
    Last Post: 11th July 2008, 12:48 PM
  4. Replies: 0
    Last Post: 27th February 2008, 01:42 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •