Jump to content

Recommended Posts

Posted

Hi All.

 

IT Dept have got 15 rasp pi 3 with the n00bs o/s.

 

I am looking at network connectivity and was wondering how you guys go about

 

1) when using wired LAN, how do you set the proxy server addresses for all programs to use?

 

2) if using on a secure wireless system how do you find out the MAC address of the WAN adaptor and how do you load the fortigate certificates on (if this is even possible?).

 

I had a fiddle yesterday and I didn't get very far.

 

Thanks!

 

Andrew

Posted

I'm assuming Raspbian, so basically Debian.

 

Log in as someone with root access, open a terminal, type sudo -s, type the user password again

nano /etc/environment

add a line line

export http_proxy="http://username:password@host:port/"

 

Press ctrl-x to save

 

For apt-get, in /etc/apt/apt.conf.d/10proxy add

Acquire::http::Proxy "http://username:password@host:port";

 

If you don't need a u/p for the proxy, remove username:password@ parts

 

https://www.brightbox.com/blog/2014/03/04/add-cacert-ubuntu-debian/ for adding a cert.

 

If they're all on the network you may be able to ssh into each one.

 

ifconfig is the linux version of ipconfig, so ifconfig -a will show the MAC

  • Thanks 1
Posted

I managed to find that export http proxy line yesterday but such a noob didn't know how to use a command line to edit a file, and couldn't get the file to save in the gui (no permissions).

 

Thanks dude will try all that!!

Posted
You can sometimes open a gui editor with root rights, but it's not always easy, same issue with using notepad on windows, can't save system files.
  • Thanks 1
Posted
Have a look online for some free software called PI Proxy I use this and it works amazingly well!
  • 9 months later...
Posted

Run your editor with sudo in front to promote it to admin (uac style) e.g. sudo leafpad

 

Then add the normal line to the config file

 export http_proxy="http://proxyaddress:port" 

and save the config.

 

(Note APT is a different proxy, this is just web browsing etc or did you want both?)

 

Steve

Posted
Run your editor with sudo in front to promote it to admin (uac style) e.g. sudo leafpad

 

Then add the normal line to the config file

 export http_proxy="http://proxyaddress:port" 

and save the config.

 

(Note APT is a different proxy, this is just web browsing etc or did you want both?)

 

Steve

 

The config file inside where, sorry?

Posted (edited)
The config file inside where, sorry?

 

Well there's a few places depending how you want it setup, but as an example if you go to:

 

sudo leafpad /etc/profile

 

Then add:

 

export http_proxy="http://proxyaddress:port"
export https_proxy="http://proxyaddress:port"

 

That should get your normal webbrowsing working.

 

For APT it should still be something like:

 

sudo leafpad /etc/apt/apt.conf

 

then add

 

Acquire::http::Proxy "http://proxyaddress:8080/";Acquire::https::Proxy "http://proxyaddress:8080/";Acquire::ftp::Proxy "ftp://proxyaddress:8080/";

 

(Been awhile since I did a pi but pretty sure that's right context for raspbian)

 

Steve

Edited by Steve21
Posted

Ahh, right OK, so THAT'S how you force a file to open in Leafpad with admin rights.

 

I'd been having issues trying to edit the files mentioned as no writ permissions and couldn't work out how to do it via terminal. (I ended up using a different method, running "gksudo" from terminal and running PCMANFM (which then opened up file manager with root, then browsing to file, right click and opening with leafpad)

using that i managed to get get-apt update to work, but still can't seem to get the browser to work (though I have now downloaded firefox and configured proxy within that!)

 

Which one would be needed to get other apps that need the internet to work?

 

Thanks

Posted

Well most normal apps if they're using http/https would need that one setting under profile (or environment) (Basically user profile or computer profile)

 

Steve

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...