If you need to use a proxy that has the same IP address as your home, here is a tutorial on how to do it.
Install and configure your Raspberry Pi OS
Install and configure a raspberry pi without a mouse nor a keyboard :
- Download the last version of raspbian lite here and download Etcher which we will use to flash the disk image on the SD card.
- Start Elena, select the Raspbian Lite imake disk, select the target which is the SD card you use for your raspberry pi and click on Flash!.
While the image disk is getting installed, we will create the file that contains the wifi information so the raspberry can connect to it automatically. Open a text note and paste this inside :
password by your home internet box settings and save that file under
Then we will create an empty file which name is simply
ssh. This file will tell the raspberry that you want to enable the SSH connection which is usually set off by default. With that settings on we will be able to connect to the raspberry pi through the network using another computer.
Place both files that you just created in the BOOT folder of the SD card you just flashed.
Congratulation ! Now you can eject the SD card and insert it in your raspberry pi.
If everything worked out, when you switch on your Raspberry Pi you should see it in the list of the device connected to your home internet network by checking your router.
Now the next step is to connect to your Raspberry Pi with SSH. Launch a terminal and if you are on mac type this command :
It will ask for a password, type
To avoid that IP to change, we will set a static IP to your raspberry. You need to modify the file
dhcpd.conf located in the folder
Once you have opened the file, go to the last line and add this content
eth0 correspond to a internet cable connection, and
wlan0 to a internet wifi connection. Up to you to choose which one you will use.
Static ip_address indicate the IP that your Raspberry Pi will have when it switch on. usually the IP is of the type
192.168.1.x, replace the x by an available slot on your network. If your box is on a different IP address then modify static router et static domain_name_servers accordingly.
Save the file and exit.
Setting up the raspberry pi
- Update the raspberry pi
- Install terminal editor Joe
- Install the following
- Edit the file proxy.h
And add the line following line above the other lines starting with #DEFINE
- Compile and install the software
- Download 3proxy.cfg
- Edit the 3proxy.cfg with Joe
- Change those lines
To any username you prefer instead of
root and change the
passwd to a strong password. If you changed root to a different username don’t forget to change
allow root to
allow and whatever username you decided. Save that file when you are finished
- Change file permission
- Download the script file
- Start the proxy server
It should give the output “Starting 3Proxy”. If it doesn’t then there is a problem somewhere in your config files.
- Add it to the autorun so after reboot it will start again
And add line :
This line has to be added above the line
The best way to check if everything is alright is by doing a full reboot of your Raspberry and checking if everything still works after the reboot :
Access your Raspberry Pi with SSH outside your home local network
You will need to add the fixed IP you choose for your Raspberry Pi in your internet box router settings. Add this IP address in the DHCP settings (the aim of this tutorial is not to each how to do that so look ressources on google).
Now edit your NAT/PAT settings to redirect the port 22 (SSH) and 3129 (your proxy) to the fixed IP address you just set up in the DHCP.
Now to access your home internet network from outside, you need a way to now its public IP address which might change over time. We will use a very good services to achieve that is called no-ip.
- Register on https://www.noip.com/
- Create a hostname like « myraspberrypiproxy.ddns.net »
- Install the DUC on your raspberry pi which will automatically update the public IP no-ip will redirect the hostname to :
- Then a little bit of configuration
- And add the following code abose this line
Now the client can be started, stopped or restarted manually
- Start the server
- To allow starting the service automatically at startup, run the following command:
- Then try sudo reboot to see if service start by itself
To check if there is a running instance use this command :
Finish ! Now you should be able to connect to your proxy with the hostname address you used in no-ip and the port 3129 like this ‘myraspberrypiproxy.ddns.net:3129’. The authorized username and password to connect to the proxy are the one you decided previously in the step 8 of configuring the proxy.
- If you need to reconfigure the DUC file from no-ip use that command :
sudo /usr/local/bin/noip2 -C
- Connect to the raspberry pi by SSH with Terminal (Mac) :
ssh pi@ipThen yes, and type password
- Check if there is a no-ip instance running
sudo noip2 -S
- Check if proxy is running