Hi, I have a problem with my internet connectivity.
I only have acces to the Internet over a proxy server. When I try to visit a website with the browser, it works, because of the proxy settings of the browser.
But when I want to install new software, there is no connection to the Internet, when I tipe in "apt-get update" for example.
Is there any posibility or setting to get access to the internet over a proxy?
Thank you!
-
- Posts: 3
- Joined: Thu Sep 27, 2012 7:45 pm
Re: Connect Raspi to a Proxy
Add the following lines to the file /etc/environment
export http_proxy="http://username:password@host:port/"
export http_proxy="http://username:password@host:port/"
Re: Connect Raspi to a Proxy
Hi,
Very new to this. I have tried to edit the file as you have said, no authentication required.
export http_proxy=http://proxy.county.ac.uk:8080
This doesn't seem to do anything. Did you get it working??
Cheers,
Pete
Very new to this. I have tried to edit the file as you have said, no authentication required.
export http_proxy=http://proxy.county.ac.uk:8080
This doesn't seem to do anything. Did you get it working??
Cheers,
Pete
Re: Connect Raspi to a Proxy
apt seems to ignore the HTTP_PROXY environment variable.
You can make it work by putting
in a file placed in /etc/apt/conf.d (named similar to "10proxy" for example). It should also work when placed in /etc/apt/apt.conf but I don't remember if this file still exists on the latest Raspbian.
You can make it work by putting
Code: Select all
Acquire::http::Proxy "http://yourproxyaddress:proxyport";
Re: Connect Raspi to a Proxy
Hi,
Thanks for the reply. Looks promising, but i'm not quite sure where exactly to add the line.
The structure i have is as follows;
/etc/apt/ - contains 3 files (sources.list, trustdb.gpg & trusted.gpg)
/etc/apt/apt.conf.d - contains 3 files (70debconf, 50raspi & 01autoremove)
/etc/apt/preferrences.d - empty
/etc/apt/sources.list.d - 1 file (raspi.list)
/etc/apt/trusted.gpg.d - empty
Do I create a new file or use one of these?
Many thanks,
Pete
Thanks for the reply. Looks promising, but i'm not quite sure where exactly to add the line.
The structure i have is as follows;
/etc/apt/ - contains 3 files (sources.list, trustdb.gpg & trusted.gpg)
/etc/apt/apt.conf.d - contains 3 files (70debconf, 50raspi & 01autoremove)
/etc/apt/preferrences.d - empty
/etc/apt/sources.list.d - 1 file (raspi.list)
/etc/apt/trusted.gpg.d - empty
Do I create a new file or use one of these?
Many thanks,
Pete
Re: Connect Raspi to a Proxy
Create a new file in /etc/apt/apt.conf.d/ and name it "10proxy"; put inside the long line in my above post. Apt-get should work immediately after.
Re: Connect Raspi to a Proxy
Wonderful. Thank you 

Re: Connect Raspi to a Proxy
Internal proxy. For internet use.
I'm getting an error using dillo; DNS failed to resolve domain\username
I have changed the file /etc/environment to read as follows;
This looks like a syntax error with my code, any suggestions?
Cheers,
Pete
I'm getting an error using dillo; DNS failed to resolve domain\username
I have changed the file /etc/environment to read as follows;
Code: Select all
export http_proxy="http://domain\username:password@proxyip:port/"
Cheers,
Pete
Re: Connect Raspi to a Proxy
Hi Guys,
Dillo doesn't like proxy servers I dont think. The above code works perfectly fine on the other richer browsers.
Cheers,
Pete
Dillo doesn't like proxy servers I dont think. The above code works perfectly fine on the other richer browsers.
Cheers,
Pete
-
- Posts: 3
- Joined: Thu Sep 27, 2012 7:45 pm
Re: Connect Raspi to a Proxy
Hi guys,
I tried to go to the directory using "cd /etc/apt/apt.conf.d" but the terminal says "Not a directory"
To create the "10proxy" file there I have to go in there.
Cut and paste doesn't work, too. (Permission denied)
If I try to move the file to the Folder "apt.conf.d" using "mv 10proxy /etc/apt/apt.conf.d" the file goes to "/etc/apt" and get the name "apt.conf.d".
I don't understand this. I just want to have a Internet connection on my Raspi.
Many thanks
I tried to go to the directory using "cd /etc/apt/apt.conf.d" but the terminal says "Not a directory"
To create the "10proxy" file there I have to go in there.
Cut and paste doesn't work, too. (Permission denied)
If I try to move the file to the Folder "apt.conf.d" using "mv 10proxy /etc/apt/apt.conf.d" the file goes to "/etc/apt" and get the name "apt.conf.d".
I don't understand this. I just want to have a Internet connection on my Raspi.
Many thanks
Re: Connect Raspi to a Proxy
Not sure about what Linux distribution you're using, but try adding a "/" at the end of the path (after apt.conf.d) and prefix the commands with sudo in order to make sure it's not a permission problem.
-
- Posts: 3
- Joined: Thu Sep 27, 2012 7:45 pm
Re: Connect Raspi to a Proxy
Worked fine.
Thank you!
Thank you!
-
- Posts: 1
- Joined: Thu Jan 23, 2014 12:21 am
Re: Connect Raspi to a Proxy
Hello, I've created the "10proxy" file and put the line said by VAXXi in it, but I still can't access apt.
I think it's because I need an username and password to connect in my proxy server.
There's something I can do to include the username and password?
Thank you.
I think it's because I need an username and password to connect in my proxy server.
There's something I can do to include the username and password?
Thank you.
- DougieLawson
- Posts: 42158
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Connect Raspi to a Proxy
At a guess
Code: Select all
Acquire::http::Proxy "http://yourusername:yourpassword@yourproxyaddress:yourproxyport";
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Connect Raspi to a Proxy
VAXXi wrote:apt seems to ignore the HTTP_PROXY environment variable.
You can make it work by puttingin a file placed in /etc/apt/conf.d (named similar to "10proxy" for example). It should also work when placed in /etc/apt/apt.conf but I don't remember if this file still exists on the latest Raspbian.Code: Select all
Acquire::http::Proxy "http://yourproxyaddress:proxyport";
Thank you. the apt-get works in my Raspi by setting the proxy.. Thank you

-
- Posts: 5
- Joined: Tue Feb 09, 2016 2:57 pm
Re: Connect Raspi to a Proxy
I used these steps to get proxy up and running -
viewtopic.php?f=28&t=136554&p=907699#p907699
then I create a blank file named 10proxy under /etc/apt/apt.conf.d and added this line :
Acquire::http::Proxy "http://yourproxyaddress:proxyport";
It works like charm !
viewtopic.php?f=28&t=136554&p=907699#p907699
then I create a blank file named 10proxy under /etc/apt/apt.conf.d and added this line :
Acquire::http::Proxy "http://yourproxyaddress:proxyport";
It works like charm !
Re: Connect Raspi to a Proxy
This works! Thanks!
Re: Connect Raspi to a Proxy
I have a similar kind of problem, where in I am connecting pi2 with raspbian Jesse to a college network having proxy server. I had set proxy in 10proxy file and everything is working fine as am able to ping google.com and all other servers. But when I try to connect to cayenne iot wget link, it shows ' resolving' and fails to connect even many tries after timeout. Am able to connect to this link in my desktop.
Can anybody help.....?
Can anybody help.....?
Re: Connect Raspi to a Proxy
Before anyone, I solved this problem myself. Just have to add proxy to wget in /etc/wgetrc
-
- Posts: 1
- Joined: Wed Apr 26, 2017 11:57 am
Re: Connect Raspi to a Proxy
HI
my raspberry pi can see the WIFI but cannot connect to it
it required a pre shared key
I entered the password of WIFI, but it still seem not connected.
there is a proxy and I dont know how to add it to the raspberry pi3
can you please explain how to add proxy to wget.
thanks very much

-
- Posts: 2
- Joined: Tue Mar 13, 2018 7:38 pm
Re: Connect Raspi to a Proxy
For connecting Raspi to a proxy server you can follow this blog. It works fine for me.
[https://theailearner.com/2018/03/13/con ... xy-server/]
[https://theailearner.com/2018/03/13/con ... xy-server/]
-
- Posts: 4
- Joined: Fri May 03, 2019 3:48 pm
Re: Connect Raspi to a Proxy
How can i connect to a proxy with raspberry pi 3 b+
It's a socks5 proxy, not http.
(host is 127.0.0.1, the port is 9050)
I have raspbian.
(yep it's tor)
It's a socks5 proxy, not http.
(host is 127.0.0.1, the port is 9050)
I have raspbian.
(yep it's tor)
-
- Posts: 44
- Joined: Tue Aug 07, 2012 2:05 pm
Re: Connect Raspi to a Proxy
Hello The community
!
I have a Pi 3B+ and a Zero W that both can wirelessly connect to a proxy : Fine
Both can ping Google, both can do apt-get update : Fine
BUT :
I have on these Pi LogitechMediaServer that is running and none of my Pi can connect to any internet Radio or Streaming plateform from the LMS when the Pi are connected to the Proxy.
I have the very same issue with other applications that need an internet connection.
Note that if connected to a non Proxy connection, LMS and any other applications can connect to Internet
So there should be some sort of indication to provide somewhere so that LMS can ALSO connect to Internet from the Proxy connection
Any idea ?
Thank you for your help.
Jean

I have a Pi 3B+ and a Zero W that both can wirelessly connect to a proxy : Fine
Both can ping Google, both can do apt-get update : Fine
BUT :
I have on these Pi LogitechMediaServer that is running and none of my Pi can connect to any internet Radio or Streaming plateform from the LMS when the Pi are connected to the Proxy.
I have the very same issue with other applications that need an internet connection.
Note that if connected to a non Proxy connection, LMS and any other applications can connect to Internet
So there should be some sort of indication to provide somewhere so that LMS can ALSO connect to Internet from the Proxy connection

Thank you for your help.
Jean