Skip to content

u/Toffski

In this archive from Jul 2019 to May 2023

1
posts
23
comments
1
media
95
score

You could skip the AUR helper entirely :)

Clone the AUR git repo for mesa git:

$ git clone https://aur.archlinux.org/mesa-git.git

Then navigate to the cloned repo and use makepkg to build mesa-git:

$ cd mesa-git
$ makepkg -sCLfi

This will attempt to build and install the package. Remove the -i flag if you don’t want to install the package right after building it.

PS. It’s a good practice to build packages in clean chroot. I’ve been using clean-chroot-manager for a while to do this and I love it! Highly recommend: https://github.com/graysky2/clean-chroot-manager

1 points

Agreed, seems to be the case of not having enough space. If the OP is running pacman -Syu on the live media (which is not necessary) then it's very likely to run out of cowspace, which is 256 MB only by default.

As lux-sol suggested, wiki is the best guide. After partitioning the disk, mount the root partition mount /dev/sdX1 /mnt and use the pacstrap to install the base pacstrap /mnt base linux linux-firmware. More packages can be installed by either appending them to the pacstrap command, or via pacman after you chroot into your new system.

PS. if really necessary, you can increase cowspace on live media using mount -o remount,size=2G /run/archiso/cowspace, which will increase it from 256MB to 2GB.

Good luck!

2 points

On an unrelated note, I've been playing around with archiso for some time - the goal is to build a custom live iso which includes:

  • A custom user with a password.
  • Auto-login disabled.
  • Pre-configured DE theme, wallpaper, etc.

As always, the wiki was great and had almost everything included to accomplish the above. Then I've stumbled on EndeavourOS github.. and just want to say: nicely done! I've used the repo as a source of inspiration on how to get certain things done, especially what to include in customize_airootfs.sh.

3 points

I’ve always used Lyx. It suited my needs because I rarely needed to use LaTeX, mostly to write papers in school - functionality it provided had always been enough for my use-case, YMMV though

2 points

Yup DNS looks fine. A quick search showed this can happen with systemd when ntpd is started before the network is up.

Two solutions I saw was either enabling ntpdate.service aka # systemctl enable ntpdate.service
Or
Edit ntpd.service and add the following for After
After=syslog.target network.target ntpdate.service sntp.service

1 points

Arch is run locally and everything else via SSH. All of the PCs at home have OpenSSH server running restricted to local LAN and WireGuard private subnet. This way I don’t have to walk to another room to get to another PC - laziness ftw!

8 points

My DE and theming are pretty basic.

Details:

What is what:

  • Arch is my daily driver laptop
  • Manjaro is a "home server" with Pi-Hole and TIG stack hosted on an old HP laptop until Raspberry replaces it.
  • Ubuntu Server and CentOS are AWS EC2 instances used for WireGuard and other projects.
3 points

Looks clean! I’ve been content with Manjaro - runs on all of my PCs at home, even on my home server. Having AUR is so convenient. I’ve been thinking if giving Intel’s Clear Linux a go, but until it has partitioning tools in the installer - Imma pass. Running it in a VM is meh.

0 points

I guess they way I look at it is why would you NOT use firewall? Even if your home devices don’t have anything of value to malicious actors - would you really want some a**hole lurking in your home network?

Plus as some have mentioned - don’t let your devices to be used for DDoS. ufw is pretty darn simple - you don’t need to specify any ports, etc.

The simplest ufw rule-set for a home network behind NAT:

# block all incoming
ufw default deny incoming
# allow everything from your home LAN
ufw allow from 192.168.1.0/24 to any

If your PC does not have a file-server or OpenSSH server - could probably just deny all incoming without even allowing home LAN. On my devices the rules look something like:

ufw default deny incoming
# Allows OpenSSH 
ufw allow from 192.168.1.0/24 to any port 22 proto tcp
# allow PiHole
ufw allow from 192.168.1.0/24 to any port 53
ufw allow from 192.168.1.0/24 to any port 80 proto tcp
ufw allow from 192.168.1.0/24 to any port 443 proto tcp
# other misc ports open for the same subnet

Idk just makes me sleep better at night even if it’s unnecessary/ placebo.

2 points

PS I've made a gist on github for this, it's much easier to read compared to reddit's codeblocks. https://gist.github.com/SirToffski/47b88acffe58ea268ffe32d780057481

$ iptables-restore-translate -f my_firewall_rules.txt > my_nf_rules.txt
$ cat my_nf_rules.txt

There will be a lot of output, but the most relevant parts are below

nft add table ip filter

INPUT chain - traversed if the final destination of the packet is the local machine - deny all by default

nft add chain ip filter INPUT { type filter hook input priority 0; policy drop; }

FORWARD chain - if final destination is elsewhere (i.e. not local machine) - default drop

nft add chain ip filter FORWARD { type filter hook forward priority 0; policy drop; }

OUTPUT chain - allow outgoing traffic

nft add chain ip filter OUTPUT { type filter hook output priority 0; policy accept; }

Add custom chains to specify what happens before/after INPUT/FORWARD/OUTPUT

nft add chain ip filter my-rules-after-input
nft add chain ip filter my-rules-after-logging-forward
nft add chain ip filter my-rules-after-logging-input
nft add chain ip filter my-rules-before-forward
nft add chain ip filter my-rules-before-input
nft add chain ip filter my-rules-before-output

Rules for rate-limiting

nft add chain ip filter my-rules-logging-deny

Rules for not-local

nft add chain ip filter my-rules-not-local

Rule to skip to policy which says to deny INPUT

nft add chain ip filter my-skip-to-policy-input

As we'll see below, this will allow outgoing traffic

nft add chain ip filter my-rules-track-output

This is where our custom rules will be

nft add chain ip filter my-rules-input

Rules to rate limit connections

nft add chain ip filter my-rules-limit
nft add chain ip filter my-rules-limit-accept

In case of INPUT, "jump" to our custom before/after input rules

nft add rule ip filter INPUT counter jump my-rules-before-input
nft add rule ip filter INPUT counter jump my-rules-after-input
nft add rule ip filter INPUT counter jump my-rules-after-logging-input

In case of FORWARD, "jump" to our custom before/after forward rules

nft add rule ip filter FORWARD counter jump my-rules-before-forward
nft add rule ip filter FORWARD counter jump my-rules-after-logging-forward

In case of OUTPUT, "jump" to our custom before/after output rules

nft add rule ip filter OUTPUT counter jump my-rules-before-output
nft add rule ip filter OUTPUT counter jump my-rules-track-output

Drop the following input:

nft add rule ip filter my-rules-after-input udp dport 137 counter jump my-skip-to-policy-input
nft add rule ip filter my-rules-after-input udp dport 138 counter jump my-skip-to-policy-input
nft add rule ip filter my-rules-after-input tcp dport 139 counter jump my-skip-to-policy-input
nft add rule ip filter my-rules-after-input tcp dport 445 counter jump my-skip-to-policy-input
nft add rule ip filter my-rules-after-input udp dport 67 counter jump my-skip-to-policy-input
nft add rule ip filter my-rules-after-input udp dport 68 counter jump my-skip-to-policy-input
nft add rule ip filter my-rules-after-input fib daddr type broadcast counter jump my-skip-to-policy-input

Rate-limit and log blocked forward

nft add rule ip filter my-rules-after-logging-forward limit rate 3/minute burst 10 packets counter log prefix "[FIREWALL BLOCK] "
# Rate-limit and log blocked input
nft add rule ip filter my-rules-after-logging-input limit rate 3/minute burst 10 packets counter log prefix "[FIREWALL BLOCK] "

Allow packets that are part of an already established communication with the network.

nft add rule ip filter my-rules-before-forward ct state related,established counter accept

Allow ICMP forward

nft add rule ip filter my-rules-before-forward icmp type destination-unreachable counter accept
nft add rule ip filter my-rules-before-forward icmp type time-exceeded counter accept
nft add rule ip filter my-rules-before-forward icmp type parameter-problem counter accept
nft add rule ip filter my-rules-before-forward icmp type echo-request counter accept
nft add rule ip filter my-rules-before-forward counter jump my-rules-forward

Do not filter loop-back

nft add rule ip filter my-rules-before-input iifname "lo" counter accept

Allows packets that are part of an already established communication with the network.

nft add rule ip filter my-rules-before-input ct state related,established counter accept
nft add rule ip filter my-rules-before-input ct state invalid counter jump my-rules-logging-deny

Drop traffic that is not part of already established flows

nft add rule ip filter my-rules-before-input ct state invalid counter drop

Allow input ICMP

nft add rule ip filter my-rules-before-input icmp type destination-unreachable counter accept
nft add rule ip filter my-rules-before-input icmp type time-exceeded counter accept
nft add rule ip filter my-rules-before-input icmp type parameter-problem counter accept
nft add rule ip filter my-rules-before-input icmp type echo-request counter accept

Allow traffic to local machine with UDP source port 67, destination port 68

nft add rule ip filter my-rules-before-input udp sport 67 udp dport 68 counter accept
nft add rule ip filter my-rules-before-input counter jump my-rules-not-local
nft add rule ip filter my-rules-before-input counter jump my-rules-input

Again, we skip loopback interface

nft add rule ip filter my-rules-before-output oifname "lo" counter accept

Allow established outgoing flows

nft add rule ip filter my-rules-before-output ct state related,established counter accept

In this case this will be empty since we allowed all outgoing traffic

nft add rule ip filter my-rules-before-output counter jump my-rules-output

Again, rate-limiting rules

nft add rule ip filter my-rules-logging-allow limit rate 3/minute burst 10 packets counter log prefix "[FIREWALL ALLOW] "
nft add rule ip filter my-rules-logging-deny ct state invalid limit rate 3/minute burst 10 packets counter return
nft add rule ip filter my-rules-logging-deny limit rate 3/minute burst 10 packets counter log prefix "[FIREWALL BLOCK] "

The following three rules end with 'return' which means return from the current chain and continue evaluation at the next rule in the last chain. If issued in a base chain, it is equivalent to accept.

nft add rule ip filter my-rules-not-local fib daddr type local counter return
nft add rule ip filter my-rules-not-local fib daddr type multicast counter return
nft add rule ip filter my-rules-not-local fib daddr type broadcast counter return
nft add rule ip filter my-rules-not-local limit rate 3/minute burst 10 packets counter jump my-rules-logging-deny

Default behaviour is to drop non-local

nft add rule ip filter my-rules-not-local counter drop

Again we can send specific FORWARD traffic to this policy which will drop it, in this case we did not specify any

nft add rule ip filter my-skip-to-policy-forward counter drop

Check out above when we asked specific rules to 'jump here', like udp dport 137 counter jump my-skip-to-policy-input. Any traffic directed here will be dropped

nft add rule ip filter my-skip-to-policy-input counter drop

We allow all outgoing

nft add rule ip filter my-skip-to-policy-output counter accept

Allow new outgoing flows

nft add rule ip filter my-rules-track-output ip protocol tcp ct state new counter accept
nft add rule ip filter my-rules-track-output ip protocol udp ct state new counter accept

We rate-limit incoming on port 22 used for SSH

nft add rule ip filter my-rules-input tcp dport 22 counter jump my-rules-limit-accept comment "'dapp_SSH'"

FINALLY; Originally requested rules. We accept all incoming on priv0

nft add rule ip filter my-rules-input iifname "priv0" counter accept

On eth0 we only accept incoming with destination tpc port 22 for SSH - though it will be wise to change the port.

nft add rule ip filter my-rules-input iifname "eth0" tcp dport 22 counter accept

Again we rate limit SSH attempts

nft add rule ip filter my-rules-limit limit rate 3/minute burst 5 packets counter log prefix "[FIREWALL LIMIT BLOCK] "
nft add rule ip filter my-rules-limit counter reject
nft add rule ip filter my-rules-limit-accept counter accept
1 points

A bit of a hack here - if you have UFW installed and are comfortable using it - write your ruleset with UFW and the use iptables-translate tool.

For example

Create the following ruleset in UFW:

ufw default deny incoming
ufw allow in on priv0
sudo ufw allow in on eth0 to any port 22 proto tcp # or another port used for SSH

Enable UFW, save rules as iptables, translate to nftables, deactivate ufw if needed.

ufw enable # if not enabled yet
ufw reload # to make sure rules have been applied
iptables-save > my_firewall_rules.txt
iptables-restore-translate -f my_firewall_rules.txt > my_nf_rules.txt
ufw disable

Here's an example UFW ruleset which we will translate to nftables:

$ sudo ufw status
Status: active

To                         Action      From
--                         ------      ----
SSH                        LIMIT       Anywhere
Anywhere on priv0            ALLOW       Anywhere
22/tcp on eth0               ALLOW       Anywhere
SSH (v6)                   LIMIT       Anywhere (v6)
Anywhere (v6) on priv0       ALLOW       Anywhere (v6)
22/tcp (v6) on eth0          ALLOW       Anywhere (v6)
1 points

End of this list.

Back to top

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.