2016年12月18日星期日

树莓派到手,记录第一次折腾上网的内容操作过程。 修改IP地址 2.进入Putty指令页面:输入(可复制下面的指令,到Putty上,点击鼠标右键就是贴上功能) sudo nano /etc/network/interfaces # interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto lo eth0 wlan0 iface lo inet loopback iface eth0 inet static address 172.29.2.250 netmask 255.255.255.0 network 172.29.2.0 allow-hotplug wlan0 iface wlan0 inet static address 192.168.99.1 netmask 255.255.255.0 up iptables-restore < /etc/iptables.ipv4.nat 3.进入Putty指令页面:输入(可复制下面的指令,到Putty上,点击鼠标右键就是贴上功能) sudo nano /etc/dhcpcd.conf interface eth0 static ip_address=172.29.2.250/24 static routers=172.29.2.162 static domain_name_servers=127.0.0.1 4.进入Putty指令页面:输入指令重起网络通讯(可复制下面的指令,到Putty上,点击鼠标右键就是贴上功能) sudo systemctl restart networking 5.验证IP是否更改完成:以浏览器访问http://192.168.1.250:10000(将IP地址更改为你更改的IP地址) 如能正常显示管理页面,静态IP地址已经设置完成 配置VPN 地址:/home/pi/sslocal.json 内容: { "server":"shkf…………", "server_port":×××, "password":"…………", "timeout":60, "method":"chacha20", "local_address": "0.0.0.0", "local_port":1080, "workers":2, "fast_open": true } 地址:/root/pac/build.sh 内容: 将里面的192.168.1.250修改为你的IP地址,保存 #!/bin/sh /root/pac/flora_pac -x 'PROXY 172.29.2.250:1081' #./flora_pac -x 'PROXY 192.168.1.250:1081; SOCKS5 192.168.1.250:1080; SOCKS 192.168.1.250:1080' #./flora_pac -x 'SOCKS5 127.0.0.1:8104; SOCKS 127.0.0.1:8104; PROXY 127.0.0.1:8103' mv flora_pac.pac /var/www/html/gfw.pac #/usr/bin/apt-get update #/usr/bin/apt-get upgrade -y #/sbin/reboot exit 0 按上面执行重启服务的方法,输入 sudo sh /root/pac/build.sh 然后重启树莓派,各设备重新连接树莓派

没有评论: