当前位置:网站首页>Raspberry pie 4B deploys lnmp+tor and builds a website on dark web
Raspberry pie 4B deploys lnmp+tor and builds a website on dark web
2022-07-03 10:24:00 【Shenzhen University of technology affiliated middle school open】
Raspberry pie 4b Deploy LNMP+Tor, Set up in Dark web On the website
Preparation before start
You need to have :
- A computer
- Raspberry pie 4b And its necessary accessories
- Putty
- Winscp
- Public network IP
We should ensure that we can access the Internet scientifically
System
download Raspberry Pi OS
Go to Raspberry pie website download Raspberry Pi OS
What I choose here is Raspberry Pi OS Lite, If it is the other two, it will not affect
Burn into TF card
Go to Balena.io download Etcher Tools 
install 
Burning system ( Remember to run as an administrator )
Wait quietly for the burning to complete
SSH
Open the raspberry pie SSH function
Just burning the system TF card (boot disc ) Create a new one without suffix SSH file 

use Putty Connect the raspberry pie
open Putty, Connect the raspberry pie 
Log in with the default account password
account number pi
password raspberry


modify SSH Password and enable root SSH Sign in
modify pi password
sudo passwd pi

Empathy , modify root password , Enable root And open ssh Sign in
sudo passwd root
sudo passwd --unlock root
sudo sed -i "s/^#PermitRootLogin.*/PermitRootLogin yes/g" /etc/ssh/sshd_config
sudo systemctl restart ssh
sudo cp ~/.bashrc /root/.bashrc

Deploy LNMP
install Nginx and PHP7
Install package
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nginx php7.3-fpm php7.3-cli php7.3-curl php7.3-gd php7.3-cgi
sudo service nginx start
sudo service php7.3-fpm restart
After successful installation, you can http:// Raspberry pie IP/ Access to the Nginx Default page for 
Nginx The root of /var/www/html
Give Way Nginx Can deal with PHP
sudo nano /etc/nginx/sites-available/default
Add the following
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}

Replace with
location / {
index index.html index.htm index.php default.html default.htm default.php;
}
location ~\.php$ {
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}

preservation
Ctrl + O
Enter
sign out
Ctrl + X
restart Nginx
sudo service nginx restart
Installation configuration MySQL
Install package
sudo apt-get install mariadb-server-10.0
change Mysql password
mysql

use mysql;
update user set plugin='mysql_native_password' where user='root';
UPDATE user SET password=PASSWORD(' The password you want to set ') WHERE user='root';
flush privileges;
exit;

restart Mysql service
service mysql restart
Install and deploy Tor service
install Tor
sudo apt-get install tor
Tor The root of /etc/tor
To configure Hidden Service obtain Onion domain name
edit /etc/tor/torrc
sudo nano /etc/tor/torrc
Find out , Get rid of the front # Number
############### This section is just for location-hidden services ###
## Once you have configured a hidden service, you can look at the
## contents of the file ".../hidden_service/hostname" for the address
## to tell people.
##
## HiddenServicePort x y:z says to redirect requests on port x to the
## address y:z.
HiddenServiceDir /var/lib/tor/hidden_service/ //hidden service The catalog of
HiddenServicePort 80 127.0.0.1:80 //HTTP The server IP, port
#HiddenServiceDir /var/lib/tor/other_hidden_service/
#HiddenServicePort 80 127.0.0.1:80
#HiddenServicePort 22 127.0.0.1:22

preservation
Ctrl + O
Enter
sign out
Ctrl + X
restart Tor service
killall tor
sudo -u debian-tor tor
Waiting to start , The first startup takes a long time , To ensure smooth network 
Just display the following
[notice] Bootstrapped 100%: Done

obtain Onion domain name
Default in /var/lib/tor/hidden_service/hostname
cd /var/lib/tor/hidden_service/
cat hostname

Modify the permissions
modify /var/www Folder permissions
sudo chown -R debian-tor:www-data /var/www

Restart again Tor service
killall tor
sudo -u debian-tor tor
Visit website
Download and install Tor browser , He said a few
Connected to the Tor service , Access the obtained Onion domain name 
complete
Reference material
SSH——https://www.jianshu.com/p/654ee08d2b3a
LNMP——https://shumeipai.nxez.com/2020/03/21/install-pi-dashboard-with-nginx-php73-on-pi.html
Tor
——https://blog.csdn.net/kEnnponN/article/details/82662445
——https://blog.csdn.net/weixin_30721899/article/details/98115671?utm_medium=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control&depth_1-utm_source=distribute.pc_relevant.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.control
——https://tor.stackexchange.com/questions/14863/var-lib-tor-is-not-owned-by-this-user-root-0-but-by-debian-tor-110
——https://askubuntu.com/questions/833021/could-not-bind-to-127-0-0-19050-address-already-in-use-is-tor-already-running
Authority modification ——https://zhidao.baidu.com/question/94171636.html
边栏推荐
- 20220609其他:多数元素
- CV learning notes - edge extraction
- Modelcheckpoint auto save model
- CV learning notes - BP neural network training example (including detailed calculation process and formula derivation)
- Deep Reinforcement learning with PyTorch
- LeetCode 面试题 17.20. 连续中值(大顶堆+小顶堆)
- CV learning notes - Stereo Vision (point cloud model, spin image, 3D reconstruction)
- Opencv note 21 frequency domain filtering
- What did I read in order to understand the to do list
- Opencv gray histogram, histogram specification
猜你喜欢

Powshell's set location: unable to find a solution to the problem of accepting actual parameters

重写波士顿房价预测任务(使用飞桨paddlepaddle)

2.1 Dynamic programming and case study: Jack‘s car rental

CV learning notes - feature extraction

Hands on deep learning pytorch version exercise solution - 2.6 probability

Leetcode - 1670 design front, middle and rear queues (Design - two double ended queues)

Leetcode - 5 longest palindrome substring

Opencv notes 20 PCA

LeetCode - 460 LFU 缓存(设计 - 哈希表+双向链表 哈希表+平衡二叉树(TreeSet))*

LeetCode - 933 最近的请求次数
随机推荐
Connect Alibaba cloud servers in the form of key pairs
20220604数学:x的平方根
Leetcode - 460 LFU cache (Design - hash table + bidirectional linked hash table + balanced binary tree (TreeSet))*
Inverse code of string (Jilin University postgraduate entrance examination question)
Standard library header file
20220606数学:分数到小数
CV learning notes - BP neural network training example (including detailed calculation process and formula derivation)
About windows and layout
【毕业季】图匮于丰,防俭于逸;治不忘乱,安不忘危。
Hands on deep learning pytorch version exercise solution - 3.1 linear regression
Hands on deep learning pytorch version exercise solution -- implementation of 3-2 linear regression from scratch
LeetCode - 895 最大频率栈(设计- 哈希表+优先队列 哈希表 + 栈) *
Leetcode bit operation
CV learning notes - image filter
Rewrite Boston house price forecast task (using paddlepaddlepaddle)
Tensorflow built-in evaluation
Leetcode - 5 longest palindrome substring
CV learning notes - deep learning
Powshell's set location: unable to find a solution to the problem of accepting actual parameters
Step 1: teach you to trace the IP address of [phishing email]