Forked from ruyadorno/install-arch-linux-on-a-raspberrypi.md
Created
May 17, 2021 12:11
-
-
Save beosro/aebf6c82abb923e7609b3394e37e469d to your computer and use it in GitHub Desktop.
Revisions
-
ruyadorno revised this gist
Aug 5, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ - Setup connection with **netctl** - Disconnect interface from **iw** `ip link set wlan0 down` - Setup netctl file from example: `cp /etc/netctl/examples/wireless-wpa-static /etc/netctl/` - Get a [256-bit pre-shared key](https://wiki.archlinux.org/index.php/Netctl#Wireless_.28WPA-PSK.29) to save instead of plain text password: `wpa_passphrase your_essid passphrase` - Start wlan: `netctl start wireless-wpa-static` - Make it start on boot: `netctl enable wireless-wpa-static` - More info on **netctl**: https://wiki.archlinux.org/index.php/Netctl#Installation -
ruyadorno revised this gist
Aug 5, 2016 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,6 +53,7 @@ - Open SSH port: `iptables -A TCP -p tcp --dport 22 -j ACCEPT` - Start **iptables**: `systemctl start iptables` - Enable it: `systemctl enable iptables` - Complete guide is here: https://wiki.archlinux.org/index.php/Simple_stateful_firewall 0. Install **sudo** - `pacman -S sudo` -
ruyadorno revised this gist
Aug 5, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ 0. (optional) OSX + Virtualbox users need an extra step to format sd card: http://www.geekytidbits.com/mount-sd-card-virtualbox-from-mac-osx/ 0. Head to https://archlinuxarm.org/platforms/armv6/raspberry-pi (Raspberrypi Zero) for instructions on how to get ARMv6 dist of Arch Linux 0. Plug SD card on Raspbery Pi and boot it up, it should be ready to go 0. Login to Arch Linux root: @@ -53,6 +53,8 @@ - Open SSH port: `iptables -A TCP -p tcp --dport 22 -j ACCEPT` - Start **iptables**: `systemctl start iptables` - Enable it: `systemctl enable iptables` 0. Install **sudo** - `pacman -S sudo` _Save this for future reference_ -
ruyadorno revised this gist
Aug 5, 2016 . 1 changed file with 28 additions and 28 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,46 +13,46 @@ - `passwd root` 0. Now may be a good point to configure internet - Wireless - Test if wireless is working: `iw dev` see if it outputs `wlan0` info - May need to activate interface with `ip link set wlan0 up` - Test interface with `ip link show wlan0` - Find your wifi `iw dev wlan0 scan | less` - More info on: https://wiki.archlinux.org/index.php/Wireless_network_configuration - Setup connection with **netctl** - Disconnect interface from **iw** `ip link set wlan0 down` - Setup netctl file from example: `cp /etc/netctl/examples/wireless-wpa-static /etc/netctl/` - Get a 256-bit pre-shared key to save instead of plain text password: `wpa_passphrase your_essid passphrase` - Start wlan: `netctl start wireless-wpa-static` - Make it start on boot: `netctl enable wireless-wpa-static` - More info on **netctl**: https://wiki.archlinux.org/index.php/Netctl#Installation 0. Replace default ssh port - `vi /etc/ssh/sshd_config` - Locate `#Port 22` line and replace with whatever port 0. Setup a stateful firewall - Start fresh: `iptables-restore < /etc/iptables/empty.rules` - Create chains: ```sh iptables -N TCP iptables -N UDP ``` - Drop any FORWARD: `iptables -P FORWARD DROP` - `iptables -P OUTPUT ACCEPT` - Drop INPUT by default: `iptables -P INPUT DROP` - Allow established connections: `iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT` - `iptables -A INPUT -i lo -j ACCEPT` - `iptables -A INPUT -m conntrack --ctstate INVALID -j DROP` - `iptables -A INPUT -p icmp --icmp-type 8 -m conntrack --ctstate NEW -j ACCEPT` - Handle TCP/UDP ```sh iptables -A INPUT -p udp -m conntrack --ctstate NEW -j UDP iptables -A INPUT -p tcp --syn -m conntrack --ctstate NEW -j TCP iptables -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset ``` - Reject other protocols: `iptables -A INPUT -j REJECT --reject-with icmp-proto-unreachable` - Open SSH port: `iptables -A TCP -p tcp --dport 22 -j ACCEPT` - Start **iptables**: `systemctl start iptables` - Enable it: `systemctl enable iptables` _Save this for future reference_ -
ruyadorno revised this gist
Aug 5, 2016 . 1 changed file with 25 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -28,6 +28,31 @@ 0. Replace default ssh port 0. `vi /etc/ssh/sshd_config` 1. Locate `#Port 22` line and replace with whatever port 0. Setup a stateful firewall 0. Start fresh: `iptables-restore < /etc/iptables/empty.rules` 1. Create chains: ```sh iptables -N TCP iptables -N UDP ``` 2. Drop any FORWARD: `iptables -P FORWARD DROP` 3. `iptables -P OUTPUT ACCEPT` 4. Drop INPUT by default: `iptables -P INPUT DROP` 5. Allow established connections: `iptables -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT` 6. `iptables -A INPUT -i lo -j ACCEPT` 7. `iptables -A INPUT -m conntrack --ctstate INVALID -j DROP` 8. `iptables -A INPUT -p icmp --icmp-type 8 -m conntrack --ctstate NEW -j ACCEPT` 9. Handle TCP/UDP ```sh iptables -A INPUT -p udp -m conntrack --ctstate NEW -j UDP iptables -A INPUT -p tcp --syn -m conntrack --ctstate NEW -j TCP iptables -A INPUT -p udp -j REJECT --reject-with icmp-port-unreachable iptables -A INPUT -p tcp -j REJECT --reject-with tcp-reset ``` 10. Reject other protocols: `iptables -A INPUT -j REJECT --reject-with icmp-proto-unreachable` 11. Open SSH port: `iptables -A TCP -p tcp --dport 22 -j ACCEPT` 12. Start **iptables**: `systemctl start iptables` 13. Enable it for reboot: `systemctl enable iptables` _Save this for future reference_ -
ruyadorno revised this gist
Aug 5, 2016 . No changes.There are no files selected for viewing
-
ruyadorno revised this gist
Aug 5, 2016 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,6 +25,9 @@ 9. Start wlan: `netctl start wireless-wpa-static` 10. Make it start on boot: `netctl enable wireless-wpa-static` 10. More info on **netctl**: https://wiki.archlinux.org/index.php/Netctl#Installation 0. Replace default ssh port 0. `vi /etc/ssh/sshd_config` 1. Locate `#Port 22` line and replace with whatever port _Save this for future reference_ -
ruyadorno revised this gist
Aug 5, 2016 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,9 +20,10 @@ 4. More info on: https://wiki.archlinux.org/index.php/Wireless_network_configuration 5. Setup connection with **netctl** 6. Disconnect interface from **iw** `ip link set wlan0 down` 7. Setup netctl file from example: `cp /etc/netctl/examples/wireless-wpa-static /etc/netctl/` 8. Get a 256-bit pre-shared key to save instead of plain text password: `wpa_passphrase your_essid passphrase` 9. Start wlan: `netctl start wireless-wpa-static` 10. Make it start on boot: `netctl enable wireless-wpa-static` 10. More info on **netctl**: https://wiki.archlinux.org/index.php/Netctl#Installation _Save this for future reference_ -
ruyadorno revised this gist
Aug 4, 2016 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,12 +18,12 @@ 2. Test interface with `ip link show wlan0` 3. Find your wifi `iw dev wlan0 scan | less` 4. More info on: https://wiki.archlinux.org/index.php/Wireless_network_configuration 5. Setup connection with **netctl** 6. Disconnect interface from **iw** `ip link set wlan0 down` 7. Setup netctl file from example: `cp /etc/netctl/examples/wireless-wpa /etc/netctl/` 8. Get a 256-bit pre-shared key to save instead of plain text password: `wpa_passphrase your_essid passphrase` 9. Start wlan: `netctl start wireless-wpa` 10. More info on **netctl**: https://wiki.archlinux.org/index.php/Netctl#Installation _Save this for future reference_ -
ruyadorno revised this gist
Aug 4, 2016 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,19 @@ - `userdel alarm` 0. Define new password for `root` - `passwd root` 0. Now may be a good point to configure internet - Wireless 0. Test if wireless is working: `iw dev` see if it outputs `wlan0` info 1. May need to activate interface with `ip link set wlan0 up` 2. Test interface with `ip link show wlan0` 3. Find your wifi `iw dev wlan0 scan | less` 4. More info on: https://wiki.archlinux.org/index.php/Wireless_network_configuration 5. Setup connection with netctl 6. Disconnect interface from **iw** `ip link set wlan0 down` 7. Setup netctl file from example: `cp /etc/netctl/examples/wireless-wpa /etc/netctl/` 8. Get a 256-bit pre-shared key to save instead of plain text password: `wpa_passphrase your_essid passphrase` 9. Start wlan: `netctl start wireless-wpa` 10. More info on netctl: https://wiki.archlinux.org/index.php/Netctl#Installation _Save this for future reference_ -
ruyadorno revised this gist
Jul 25, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,4 +18,6 @@ More info on user namanagement: https://wiki.archlinux.org/index.php/users_and_g General setup recommendations: https://wiki.archlinux.org/index.php/general_recommendations General system maintenance: https://wiki.archlinux.org/index.php/System_maintenance Raspberry Pi Zero Headless Setup: https://davidmaitland.me/2015/12/raspberry-pi-zero-headless-setup/ -
ruyadorno revised this gist
Jul 25, 2016 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,4 +16,6 @@ _Save this for future reference_ More info on user namanagement: https://wiki.archlinux.org/index.php/users_and_groups#User_management General setup recommendations: https://wiki.archlinux.org/index.php/general_recommendations General system maintenance: https://wiki.archlinux.org/index.php/System_maintenance -
ruyadorno revised this gist
Jul 25, 2016 . 1 changed file with 5 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,18 +5,13 @@ - user: root - pass: root 0. Create new user: - `useradd -m -G wheel -s /bin/bash username` - `passwd username` 0. Remove defaul `alarm` user: - `userdel alarm` 0. Define new password for `root` - `passwd root` _Save this for future reference_ More info on user namanagement: https://wiki.archlinux.org/index.php/users_and_groups#User_management -
ruyadorno revised this gist
Jul 25, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,4 +21,4 @@ _Save this for future reference_ More info on user namanagement: https://wiki.archlinux.org/index.php/users_and_groups#User_management General setup recommendations: https://wiki.archlinux.org/index.php/general_recommendations -
ruyadorno revised this gist
Jul 25, 2016 . 1 changed file with 4 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,11 +5,10 @@ - user: root - pass: root 0. Create new user: ```sh useradd -m -G wheel -s /bin/bash username passwd username ``` 0. Remove defaul `alarm` user: ```sh userdel alarm -
ruyadorno revised this gist
Jul 25, 2016 . 1 changed file with 10 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,19 +5,19 @@ - user: root - pass: root 0. Create new user: ```sh useradd -m -G wheel -s /bin/bash username passwd username ``` 0. Remove defaul `alarm` user: ```sh userdel alarm ``` 0. Define new password for `root` ```sh passwd root ``` _Save this for future reference_ More info on user namanagement: https://wiki.archlinux.org/index.php/users_and_groups#User_management -
ruyadorno revised this gist
Jul 25, 2016 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,10 +5,10 @@ - user: root - pass: root 0. Create new user: ```sh useradd -m -G wheel -s /bin/bash username passwd username ``` 0. Remove defaul `alarm` user: ```sh -
ruyadorno revised this gist
Jul 25, 2016 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,9 +10,6 @@ useradd -m -G wheel -s /bin/bash username passwd username ``` 0. Remove defaul `alarm` user: ```sh userdel alarm @@ -21,5 +18,8 @@ userdel alarm ```sh passwd root ``` _Save this for future reference_ More info on user namanagement: https://wiki.archlinux.org/index.php/users_and_groups#User_management 0. General setup recommendations: https://wiki.archlinux.org/index.php/general_recommendations -
ruyadorno revised this gist
Jul 25, 2016 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,10 @@ useradd -m -G wheel -s /bin/bash username passwd username ``` More info on user namanagement: https://wiki.archlinux.org/index.php/users_and_groups#User_management 0. Remove defaul `alarm` user: ```sh userdel alarm -
ruyadorno renamed this gist
Jul 25, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ 0. (optinal) OSX + Virtualbox users need an extra step to format sd card: http://www.geekytidbits.com/mount-sd-card-virtualbox-from-mac-osx/ 0. Head to https://archlinuxarm.org/platforms/armv6/raspberry-pi (Raspberrypi Zero) for instructions on how to get ARMv6 dist of Arch Linux 0. Plug SD card on Raspbery Pi and boot it up, it should be ready to go 0. Login to Arch Linux root: - user: root -
ruyadorno created this gist
Jul 23, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,21 @@ 0. (optinal) OSX + Virtualbox users need an extra step to format sd card: http://www.geekytidbits.com/mount-sd-card-virtualbox-from-mac-osx/ 0. Head to https://archlinuxarm.org/platforms/armv6/raspberry-pi for instructions on how to get ARMv6 dist of Arch Linux 0. Plug SD card on Raspbery Pi and boot it up, it should be ready to go 0. Login to Arch Linux root: - user: root - pass: root 0. Create new user: ```sh useradd -m -G wheel -s /bin/bash username passwd username ``` 0. Remove defaul `alarm` user: ```sh userdel alarm ``` 0. Define new password for `root` ```sh passwd root ``` _Save this down!_