Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Pi Zero add to /etc/dhcpcd.conf
- profile fb_usb0
- static ip_address=172.19.180.1/24
- static routers=172.19.180.254
- static domain_name_servers=8.8.8.8 208.67.222.222
- interface usb0
- fallback fb_usb0
- ## Pi3 add to /etc/dhcpcd.conf
- profile fb_usb0
- static ip_address=172.19.180.254/24
- interface usb0
- fallback fb_usb0
- ## Pi 3 setup NAT
- sudo sh -c "echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf"
- sudo sysctl -p /etc/sysctl.conf
- sudo iptables -t nat -A POSTROUTING -s 172.19.180.0/24 ! -o usb0 -j MASQUERADE
- sudo iptables -A FORWARD -i usb0 ! -o brint -j ACCEPT
- sudo iptables -A FORWARD -o usb0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
- sudo sh -c "iptables-save > /etc/iptables/rules.v4"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement