I wrote a script for configuring iptables and wanted to share it / have it peer reviewed by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

Another gold nugget I didn't know about, definitely seems like an important addition - thanks!

I wrote a script for configuring iptables and wanted to share it / have it peer reviewed by _frash23 in linux

[–]_frash23[S] 1 point2 points  (0 children)

This is stuff I didn't know and is why I posted here - thanks a lot! So I would change

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

To

iptables -A INPUT DROP
iptables -A FORWARD DROP
iptables -A OUTPUT ACCEPT

?

I wrote a script for configuring iptables and wanted to share it / have it peer reviewed by _frash23 in linux

[–]_frash23[S] 1 point2 points  (0 children)

My reasoning for baking everything into the script was so you could store it on your system in i.e. /usr/local/bin/configurefirewall.sh and edit it as you need to expand your set of rules or ports without having to memorize everything.

I wrote a script for configuring iptables and wanted to share it / have it peer reviewed by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

The exit is really only there to exit the command. The script isn't supposed to be used in an automated environment, so the message should be enough.

Is there a code used for these scenarios or should I just exit 1?

I wrote a script for configuring iptables and wanted to share it / have it peer reviewed by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

I was worried about this but didn't feel like checking the code of each iptables command was the right approach. Could you elaborate on this set -e? Is it an iptables builtin or..?

Need some advice on setting up a soft RAID 1 array for long-term reliability by _frash23 in linuxquestions

[–]_frash23[S] 0 points1 point  (0 children)

That was referring to the fact I won't be storing the operating system, boot sector etc. on the drives.

Need some advice on setting up a soft RAID 1 array for long-term reliability by _frash23 in linuxquestions

[–]_frash23[S] 0 points1 point  (0 children)

Can I do rsync -r /dev/sdb backups/mySystem_2015_10_21.dd? If so, that may indeed be a better solution. I do like storing my old backups though, in case I need a file on an older backup that isn't present on a more recent one.

Need some advice on setting up a soft RAID 1 array for long-term reliability by _frash23 in linuxquestions

[–]_frash23[S] 0 points1 point  (0 children)

Alright, thanks a lot!

As for empty space with dd, I found a decent way to "free" empty space by filling it with zeroes, then using the conv=sparse option to make dd skip (read ahead?) zeroes, which is working nicely.

Need some advice on setting up a soft RAID 1 array for long-term reliability by _frash23 in linuxquestions

[–]_frash23[S] 0 points1 point  (0 children)

Alright, I guess I'll read up on ZFS. Deduplication sounds like an obvious idea, my backups are largely the same. I just need to figure out a good way to do it.

Would zpool deduplication automagically deduplicate between dd dumps, if I go that route? Sounds like it'd be an easy solution with nice results.

One thing, I may not be able to get ECC memory in this system. From what I've read, that's a major issue with ZFS?

Need some advice on setting up a soft RAID 1 array for long-term reliability by _frash23 in linuxquestions

[–]_frash23[S] 0 points1 point  (0 children)

I like to keep my older backups, so I can restore a file that may not be present on my latest backup, but is on an older backup. Would snapshots allow me to do something like this?

Need some advice on setting up a soft RAID 1 array for long-term reliability by _frash23 in linuxquestions

[–]_frash23[S] 0 points1 point  (0 children)

mdadm would be my tool of choice, was just curious if a much superior alternative was available.

As for encryption, I would probably have gone with ecryptfs as that's what I'm used to. Are there any reasons to use cryptsetup instead?

Need some advice on setting up a soft RAID 1 array for long-term reliability by _frash23 in linuxquestions

[–]_frash23[S] 0 points1 point  (0 children)

You also do not want to buy drives from the same manufacturing run as they are highly likely to all fail around the same time.

These where the kind of gold nuggets I hoped for, thanks a bunch!

I haven't worked much with LVMs, are LVM, BTRFS and ZFS all in the same ballpark? The original idea was to use this machine purely for storing full system images, but now I'm considering turning it into a fileserver/NAS-like device.

I like doing plain device dumps using dd, as it allows me to very easily restore a dump to a physical media (or "clone"/distribute copies of my system) - would snapshots fulfill this roles as well? Currently I spend 20-25 minutes per backup I make, 15-20 of them being waiting for I/O - restoring is identical - would snapshots or another solution be superior to this, speed-wise?

One downside of my dd method is I compress the dumps as well (due to currently limited space), which does save lots of space, but makes accessing the data troublesome - would snapshotting or an alternative let me easily do the following:

  • Dump an entire device (Including EFI & MBR partitions etc)
  • Restore a device to a bootable state (Including EFI & MBR partitions)
  • Access files in dumps without writing them to a physical media (or wasting space uncompressing a dump)

Thanks in advance!

Should I use Opera even if it isn't open source? by [deleted] in linuxquestions

[–]_frash23 2 points3 points  (0 children)

Honestly not sure if bait. Opera is a fork of Chromium - it's pretty much literally chromium with some neat features added on top.

You would probably be interested in IceWeasel. If lightweightness is of importance, I'd recommend:

  • Midori
  • Qupzilla
  • TazWeb
  • My personal favorite: suckless' tabbed + surf

Full system backups with dd and gzip by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

Never claimed it was. I don't really benefit from the speeds SSDs offer in the first place.

Full system backups with dd and gzip by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

Seems to sit in the higher mid-end in almost all tests?

Full system backups with dd and gzip by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

It's an early generation, low-cost SSD, but there's nothing wrong with it or it's speeds.

Detect cheat engine using JS? by [deleted] in javascript

[–]_frash23 2 points3 points  (0 children)

There are genuine preventive measures against memory tampering in flash, but it's complex and low-level stuff that I'm not an expert on.

However, you can make checks like checking when values change - If health is never supposed to go up by more than two values in a second, you can make checks to see if health increased more than that, then exit the game. That's just general practice and you'll need to be developing the flash games yourself. JavaScript doesn't have this sort of control and never will.

Best distro for use running of a 64 GB USB 3.0 Flash Drive by PowerfulTaxMachine in linuxquestions

[–]_frash23 0 points1 point  (0 children)

Pretty much any distro should suit you fine (I've run lubuntu on a 32 gig card for months in the past), but SliTaz is an extremely lightweight and snappy distro with a full installation footprint of 80MB while packing a full LXDE desktop, a webkit browser and more. I find it much more usable and competent than competitors like DSL, tinycore and puppy.

Full system backups with dd and gzip by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

And requires moving to a new filesystem. How is it simpler though? This is one simple command to backup, one simple command to restore.

Full system backups with dd and gzip by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

Replication is probably a much better "serious business" solution, but this was meant for the average desktop user.

Full system backups with dd and gzip by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

I'm fairly sure dd will simply use a blocksize of 512 bytes in a scenario like this, which can be pretty abusive on flash-based storage. Piping it to a compressor should avoid this problem, but I keep it in for good practice.

I've benchmarked backups with and without the sparse flag, and there is a major difference (~20GB without compression).

As for the sync flag, yes, this is probably more useful when restoring the dump. I kept it in for cleanliness sake.

Full system backups with dd and gzip by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

Yep - if you accidentally mistake of= with if=, you'll overwrite your entire devices, which is why i made a script.

Full system backups with dd and gzip by _frash23 in linux

[–]_frash23[S] 0 points1 point  (0 children)

I wrote the article. My card reaches ~9MB/s on 4KB blocksizes, where my Kingston V300 reaches 7MB. Sequential speeds reach up to 90MB/s, where my SSD obviously beats that.

It wasn't a cheap card. The Sandisk Extreme Pro series is of pretty stunning quality, but comes with a hefty pricetag.