![]() Be careful though, when doing this over a SSH connection, you will lock yourself out :). ![]() It can be installed with sudo apt install ufw and can be enabled on a terminal with sudo ufw enable. One easy to use firewall is the uncomplicated firewall (UFW). Debian is currently introducing nftables and fades out iptables, but the latter still works (using nftables under the hood). Mobian can use any firewall that is supported by Debian. However when you install services, such as openssh, web servers and whatever, you might want to lock down your device using a firewall. When you disconnect the cable without rebooting any device, on reconnecting you only need to repeat the commands on the PinePhone to set up the default route again.Ĭonnecting the Pinephone to windows via USBīy default, Mobian has no listening services on any internet port and a firewall is not necessary. | grep ether | cut -d ' ' -f 1)"Įcho 'nameserver 1.1.1.1' | sudo tee /etc/nf Sudo ip route add default via "$(sudo arp -n | grep 10.66.0. Sudo iptables -t nat -A POSTROUTING -o "$DEV" -j MASQUERADEĪfterwards, on the PinePhone, e.g., through SSH to 10.66.0.1, you need to set the default route to be your PC's USB network interface, and you need to define a DNS server (here 1.1.1.1 from Cloudflare): Sudo iptables -t nat -D POSTROUTING -o "$DEV" -j MASQUERADE 2> /dev/null || true Set up ip-forwarding on your PC and set up NAT on your outgoing internet interface:ĭEV=$(ip route get 1 | grep -o 'dev. The PinePhone has the IP address 10.66.0.1 fixed but the IP address of your PC will vary. When connecting the PinePhone through the USB cable it creates a network the PC will join.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |