permacomputing

Source repository for the main permacomputing wiki site
git clone http://git.permacomputing.net/repos/permacomputing.git # read-only access
Log | Files | Refs

commit 19147cc4c28e5e3badfb5936e8d971c1b596ffea
parent 398b5452417adc911dd78cec83be50ab41be960e
Author: ugrnm <ugrnm@web>
Date:   Thu, 21 May 2026 23:52:54 +0200

nftables rules

Diffstat:
Munbrick01.mdwn | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/unbrick01.mdwn b/unbrick01.mdwn @@ -96,7 +96,7 @@ After you boot to a TTY you can ssh into the phone after you give the phone an i Usually the phone has a random string like this `enx9ad89e8d8f22`. This is a USB network interface. Give this interface a ip address -`sudo dclient enx9ad89e8d8f22` +`sudo dhclient enx9ad89e8d8f22` Now you can SSH into the phone with the username and password set during `pmbootstrap install`. @@ -106,9 +106,14 @@ Now you can SSH into the phone with the username and password set during `pmboot To share your internet connection to the phone run the following commands on your machine: -```bash +```sh sudo sysctl net.ipv4.ip_forward=1 +# for OS with iptables use the following: sudo iptables -t nat -A POSTROUTING -o <your-internet-interface> -j MASQUERADE +# for OS with nftables use the following +sudo nft add table inet nat +sudo nft add chain inet nat postrouting '{ type nat hook postrouting priority srcnat ; }' +sudo nft add rule inet nat postrouting oifname <your-internet-interface> masquerade ``` You can find your internet interface with `ip a`. On the phone run the following commands: