Craynerd
Posts: 37
Joined: Mon Nov 25, 2013 9:09 pm

Proxy settings - access net in terminal

Mon Jan 27, 2014 11:47 am

Hi

I`m trying to use the raspi from behind a proxy at work (school).

I have followed the following info:

Code: Select all

Proxy support for browsers etc…
 

sudo nano /etc/environment
 export http_proxy=”http://YOU.R.IP.ADR:PORT”
 
Proxy support for APT…
 

sudo nano /etc/apt/apt.conf.d/10proxy
 Acquire::http::Proxy “http://YOU.R.IP.ADR:PORT”;
After doing this, it allowed me to correctly use the apt-get function and browse the web in a browser. However, I am running a script that uploads data to the internet and this is not running correctly! I have tried to ping google:

Code: Select all

ping 8.8.8.8
and get no reply so I am guessing I have no internet access from command terminal!

I am very much a beginner but is it normal not to get a ping from google or is this likely the issue. How can I solve it?

Any help appreciated.

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Proxy settings - access net in terminal

Mon Jan 27, 2014 11:51 am

What happens when you run traceroute 8.8.8.8 ??

Richard S.

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Proxy settings - access net in terminal

Mon Jan 27, 2014 12:16 pm

Proxy's don't let you ping or traceroute to the internet. It is what they do.

If you want to upload to the internet, you have to use an application that is proxy capable.

Setting up a ftp client to use a proxy is not difficult but it can be tricky.

There is one possible gotcha in all this. It is possible that the proxy does not allow protocols other than HTTP.

Proxys really do help in keeping malware away.
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

Craynerd
Posts: 37
Joined: Mon Nov 25, 2013 9:09 pm

Re: Proxy settings - access net in terminal

Mon Jan 27, 2014 3:21 pm

https://github.com/tomhartley/AirPi

This is the code I`m running and it uploads the data to xively. It works fine from home but here in school it fails and I don`t know why. I`ve got all the weather station modules and I really need to get this working or it`ll be a great waste in money!

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Proxy settings - access net in terminal

Mon Jan 27, 2014 3:25 pm

What kind of proxy is your school running, is it web based only access with user / password authentication??

Richard S.

Craynerd
Posts: 37
Joined: Mon Nov 25, 2013 9:09 pm

Re: Proxy settings - access net in terminal

Mon Jan 27, 2014 3:52 pm

Hi, I`m not really clear on networking but if it helps, yes we do have user and pass logins but that is to access the local network. I can get an internet connection by bringing in any device and adding proxy to proxy.oldsch and adding the port 8080. I can then get access to the net on any device not password or username needed.

Also, there is a wireless guest network which apparently has ALL access to the internet just without internal network connection.

I appreciate your help!

--------------
EDIT
$ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
...... Continues to ..
30 * * *

Back to command prompt.

keithellis
Posts: 142
Joined: Thu Dec 12, 2013 10:39 pm
Location: Suffolk, UK
Contact: Website

Re: Proxy settings - access net in terminal

Mon Jan 27, 2014 4:17 pm

Can you ping 8.8.8.8 from one of the schools computers. It is most likely the proxy is preventing certain connections, that is what they do. Try using the guest network, that should be unrestricted.

Or talk to your admin to open up the sites you need access to on the proxy.

Craynerd
Posts: 37
Joined: Mon Nov 25, 2013 9:09 pm

Re: Proxy settings - access net in terminal

Mon Jan 27, 2014 4:55 pm

I`ve just tried to ping a few websites and google 8.8.8.8 from cmd in windows and on all sites: "request timed out"

I don`t know what the tells us or where to go from here.....!

Any further help would be much appreciated.

Chris

Craynerd
Posts: 37
Joined: Mon Nov 25, 2013 9:09 pm

Re: Proxy settings - access net in terminal

Mon Jan 27, 2014 4:58 pm

just also did a tracert google.com:
1. 6ms 4ms 3ms 10.10.10.2
2. * * * request timed out.....

Don`t know if that helps any! To be honest, I just want to send the data being collected on the RasPi to Xively!

Chris

Return to “General discussion”