2018年6月4日星期一

在树莓派上设置PXE服务器,支持从网络启动

在树莓派上安装PXE服务,并使用grub4dos引导系统
参考:
1. https://en.wikipedia.org/wiki/Preboot_Execution_Environment
2. https://github.com/chenall/grub4dos/blob/master/README_GRUB4DOS_CN.txt

一、安装dnsmasq,配置dhcp和tftp服务
sudo apt-get install dnsmasq
修改配置文件/etc/dnsmasq.conf,在文件末尾添加如下内容:
interface=eth0
dhcp-range=192.168.0.2,192.168.0.253,255.255.255.0,12h
enable-tftp
tftp-root=/tftpboot
dhcp-boot=grldr
dhcp-option=3,192.168.0.1

二、配置网卡eth0为静态IP地址
修改/etc/network/interface文件
auto eth0
iface eth0 inet static
        address 192.168.0.1
        netmask 255.255.255.0

三、建立tftpboot文件夹
cd /
sudo mkdir tftpboot
cp grldr /tftpboot
chown -R nobody: /tftpboot

四、设置dnsmasq开机启动
systemctl enable dnsmasq

五、重启系统



2018年4月23日星期一

树莓派常用工具列表

1、反向代理工具:https://github.com/fatedier/frp
frp 是一个可用于内网穿透的高性能的反向代理应用,支持 tcp, udp, http, https 协议。
利用反向代理和具有公网IP的服务器可以远程访问处于内网的树莓派

2、shadowsocks代理:https://github.com/shadowsocks
A secure socks5 proxy, designed to protect your Internet traffic.


3、代理上网:https://github.com/haad/proxychains
proxychains - a tool that forces any TCP connection made by any given application to follow through proxy like TOR or any other SOCKS4, SOCKS5 or HTTP(S) proxy. Supported auth-types: "user/pass" for SOCKS4/5, "basic" for HTTP.
用法示例:proxychains curl https://www.google.com

4、百度云工具:https://github.com/houtianze/bypy
Python client for Baidu Yun (Personal Cloud Storage) 百度云/百度网盘Python客户端
可以利用bypy在树莓派上访问百度云,首次运行需要授权,授权过程可能需要翻墙才能成功。可以利用shadowsocks和proxychains代理。先安装shadowsocks代理,然后运行:
proxychains bypy info