Often the functionality of a home router is not enough and you want more protection. Today I will tell you how to make your own router from Raspberry PI. Here are just the basics. I leave the rest to you to think out. The possibilities are endless.
The original OS is available for download here https://www.raspberrypi.org/downloads/raspbian/
The router will “pick up” the Internet via Ethernet or USB 3G modem connected to it.
Further, the router has 3 operating modes:
1. TOR - (Works only through torus)
2.TOR + SOCKS (TOP and on top of the torus at the exit, a regular socks5 is used)
3. TOR + SOCKS = AUTH (Tor, and on top of the torus at the exit, the usual socks5 with authorization is used).
Internet is distributed via WIFI.
You connect via WIFI to our router:
SSID: AP-1 Password: 12345678
and without any additional settings, you get the Internet through TOP or TOP + Sox. Proxy and other things are not needed, everything is done on the router. All DNS requests go through the TOP using the dns_tcp_proxy daemon.
What's on the router itself?
3proxy - as a sox daemon in transparent + parent mode
dns_proxy - for tunneling dns requests to the torus.
hostapd - for distributing wifi
dnsmasq - for distributing Wi-Fi IP addresses to clients.
python3 - for the webmanager interface I wrote to work.
torus - you know why.
wvdial - for working with a 3G modem.
Interface screenshots:
Full Raspberry PI image with all installed and fully working version can be downloaded here .
The image is completely ready for work, we write it to the SD card using etcher, and insert it into the raspberry.
The image is slightly modified, the pi entry is removed, login only as root, SSH is already enabled.
SSH connection details:
Username: root
Pass: 123456
Everything else is by default, as in the classic raspbian.
The first time you start, you will need to expand the file system.
We type:
Code:
raspi-config
And we go here to these menus:
further in.
And we agree to increase the space.
An option for those who want to assemble everything themselves, on their own raspberry with pure debian stretch, here.
A small description of the process.
Downloading Debian stretch
we write to the SD card, I recommend to take ethcer for recording here: https://etcher.io/
after the recording is completed, do not forget to turn on the ssh.
To do this, we reconnect the SD card to the laptop and create an ssh file on the rubble partition without the txt extension, etc.
safely remove the card and insert it into the raspberry.
when the raspberry boots up, log in to it using SSH
Username: pi
Password: raspberry
Then we type sudo -s (go to root mode)
And download the installer
Code:
curl -O https://nova.ws/dl/release/pi_tor_socks/install.sh
When the download process is complete, type:
Code:
sh install.sh
Then the script will do everything by itself.
During the installation process, additional questions may arise, here are the answers to them:
The admin panel of the router is available at: http // 192.168.22.1: 5000 (if you connect to it via wifi)
At the moment, everything has been tested, rewritten more than once, and it seems to work correctly.
Ready configs can be downloaded here.
The Python web interface can be downloaded separately here.
The 3G daemon is launched by default, my MF180 AND MF667 start up normally.
That would not change the port in the 3G config in the raspberry interface.
We stick it into this port.
Update on github https://github.com/novaws/pi_tor_socks
Good luck.
Be safe and take care of yourself.
The original OS is available for download here https://www.raspberrypi.org/downloads/raspbian/
The router will “pick up” the Internet via Ethernet or USB 3G modem connected to it.
Further, the router has 3 operating modes:
1. TOR - (Works only through torus)
2.TOR + SOCKS (TOP and on top of the torus at the exit, a regular socks5 is used)
3. TOR + SOCKS = AUTH (Tor, and on top of the torus at the exit, the usual socks5 with authorization is used).
Internet is distributed via WIFI.
You connect via WIFI to our router:
SSID: AP-1 Password: 12345678
and without any additional settings, you get the Internet through TOP or TOP + Sox. Proxy and other things are not needed, everything is done on the router. All DNS requests go through the TOP using the dns_tcp_proxy daemon.
What's on the router itself?
3proxy - as a sox daemon in transparent + parent mode
dns_proxy - for tunneling dns requests to the torus.
hostapd - for distributing wifi
dnsmasq - for distributing Wi-Fi IP addresses to clients.
python3 - for the webmanager interface I wrote to work.
torus - you know why.
wvdial - for working with a 3G modem.
Interface screenshots:





Full Raspberry PI image with all installed and fully working version can be downloaded here .
The image is completely ready for work, we write it to the SD card using etcher, and insert it into the raspberry.
The image is slightly modified, the pi entry is removed, login only as root, SSH is already enabled.
SSH connection details:
Username: root
Pass: 123456
Everything else is by default, as in the classic raspbian.
The first time you start, you will need to expand the file system.
We type:
Code:
raspi-config
And we go here to these menus:

further in.

And we agree to increase the space.
An option for those who want to assemble everything themselves, on their own raspberry with pure debian stretch, here.
A small description of the process.
Downloading Debian stretch
we write to the SD card, I recommend to take ethcer for recording here: https://etcher.io/
after the recording is completed, do not forget to turn on the ssh.
To do this, we reconnect the SD card to the laptop and create an ssh file on the rubble partition without the txt extension, etc.
safely remove the card and insert it into the raspberry.
when the raspberry boots up, log in to it using SSH
Username: pi
Password: raspberry
Then we type sudo -s (go to root mode)
And download the installer
Code:
curl -O https://nova.ws/dl/release/pi_tor_socks/install.sh
When the download process is complete, type:
Code:
sh install.sh
Then the script will do everything by itself.
During the installation process, additional questions may arise, here are the answers to them:



The admin panel of the router is available at: http // 192.168.22.1: 5000 (if you connect to it via wifi)
At the moment, everything has been tested, rewritten more than once, and it seems to work correctly.
Ready configs can be downloaded here.
The Python web interface can be downloaded separately here.
The 3G daemon is launched by default, my MF180 AND MF667 start up normally.
That would not change the port in the 3G config in the raspberry interface.
We stick it into this port.

Update on github https://github.com/novaws/pi_tor_socks
Good luck.
Be safe and take care of yourself.