19
votes
Linux / BSD "quickly" wipe a USB drive?
The Linux command to remove all disklabel and file systems signatures is:
wipefs -a /dev/sd###
Most modern flash disks and flash USB sticks are supporting TRIM / DISCARD / SCSI UNMAP. For USB you ...
16
votes
Should I create ZFS zpools with whole disks or partitions?
Use one slice/partition dedicated for ZFS per physical disc and leave some space unpartitioned. That way if you ever need to replace a drive and the replacement is 10 sectors smaller, you'll still be ...
15
votes
Accepted
BSD nc (netcat) does not terminate on EOF
I, too, was puzzled by netcat's behavior, so I dug into the code. Here's the whole story:
nc servers (nc -l) and clients only exit after the mutual connection was closed. That is, if each of the ...
15
votes
Accepted
Linux / BSD "quickly" wipe a USB drive?
The fastest way is to remove all partitions on the drive. This will "remove" also filesystems. And zero first megabyte (boot record and so).
dd if=/dev/zero of=/dev/da0 bs=1M count=1
and ...
10
votes
Linux / BSD "quickly" wipe a USB drive?
There's different kinds of USB storage devices.
If your device supports it,
blkdiscard /dev/da0
on Linux, or
trim /dev/da0
on FreeBSD
will tell the drive to just drop all data. That's going to be ...
8
votes
Accepted
Install Java 9, 10, 11, or 12 on FreeBSD 11.1
Java 11 & 12
OpenJDK 11 and 12 can now be found in the Ports tree. See:
java/openjdk11
java/openjdk12
An effort is underway to see future versions of OpenJDK for FreeBSD regularly made ...
7
votes
Linux / BSD "quickly" wipe a USB drive?
I do not care about "securely" wiping the data I just want it wiped so I can re-establish the partition structure and filesystem from scratch
Just run mkfs on the partitions.
6
votes
Accepted
Resize zfs pool
camcontrol reprobe da0
will reprobe. after that I only needed: zpool online -e tank da0
5
votes
BSD nc (netcat) does not terminate on EOF
nc establishes a bi-directional connection. I.e. it sends stdin from host B to host A as well as the desired one from A to B.
Use -d on host B to ignore stdin. -N on host A is still needed to close ...
5
votes
Should I create ZFS zpools with whole disks or partitions?
People here claim you need to use whole disks to get disk write cache advantages, but that's not true. What is true is that ZFS will try to enable the disk write cache for you if you give it the whole ...
4
votes
Symbolic Links and Multiple Mount Points
Alright... Let's attempt an answer to this question.
The setup and master/skeleton directories
The "root" directory of the jail system is /home/j. It contains 3+ subdirectories:
/home/j/
|- ...
3
votes
What is the alternative to ls --time-style=full-iso in BSD?
I know this is an old question, but if you're on OS X you can install coreutils to get the GNU version of ls, which includes the --time-style option:
brew install coreutils
Note that by default the ...
3
votes
Accepted
How to force Apache to skip binding to failed interface?
If you want Apache to listen on all IP addresses assigned to the machine you can simply specify a bind directive without any IP address, for example:
Listen 80
If you need to bind to only a subset ...
3
votes
netcat -e: the GAPING_SECURITY_HOLE
While I've no definitive answer, I believe the gaping security hole is only present if your nc has -e enabled and is setuid root. (As nc is often used to bind to ports, it might be packaged setuid ...
3
votes
Accepted
Where is Apache's 000-default.conf in FreeBSD?
You probably mean sites-enabled/000-default Virtual Host, like in many Linux distributions. There isn't one.
In FreeBSD, as described in the handbook, VirtualHosts are configured directly in /usr/...
3
votes
Accepted
How do you expand /var in pfsense when you run it in memory?
It's right there in front of your nose. :)
Generally speaking, though, you should limit the amount of data you're storing on your pfsense instance. For logs, ship them off to another loghost for ...
3
votes
Accepted
Using bash shell when logging into FreeBSD ssh
If you simplify your command line, the shell likely won't matter. This should likely work
ssh </some/filelist -i /home/user/.ssh/some_key user@freebsd11 xargs -n 1 stat -f \"%N;%c;%m\" | sort
...
2
votes
Layer 3 routing based on HTTP packet content
The problem I see here is that you have to accept the TCP connection before you get to see the http request. So even if the system could use application level data it would not have that data at the ...
2
votes
Accepted
Layer 3 routing based on HTTP packet content
For BSD i would look into relayd(8) - its native to OpenBSD, but i believe FreeBSD has a port too. It is quite powerful and can do more than a few things (ex., proxy, load balancer, application ...
2
votes
Using bash shell when logging into FreeBSD ssh
Use ansible. You don't need to add any additional software on the target machines and, arguably, it simplifies what you need to do. ansible uses standard ssh to connect to the machines, sudo, pfexec ...
2
votes
Accepted
During OpenBSD installation, what is "DNS domain name" for?
It wants to know the domain name of the system, so that it can pair that with the hostname to come up with the system's full-qualified domain name (FQDN). See here.
I'm guessing this is an ...
2
votes
Accepted
Is XNU based on FreeBSD or OpenBSD?
From https://github.com/apple-oss-distributions/xnu
What is XNU?
XNU kernel is part of the Darwin operating system for use in macOS and iOS operating systems. XNU is an acronym for X is Not Unix. XNU ...
2
votes
Accepted
How to disable opensshd's self-introductory banner
The minimal identification string for the ssh protocol is:
SSH-2.0-
however OpenSSH will always send at least OpenSSH_*.*. If you want a more stealth behaviour you have several options:
You can ...
2
votes
Copy/Snyc files with extended attributes between Linux and BSD
Tar is probably your best bet, as you aren't running ZFS on the Linux box. Otherwise you could probably just zfs send/recv.
But you can skip the temporary tarball and simply send the data in one shot:...
1
vote
Force ZFS to ignore checksum errors without removing the offending disk
I myself willingly am shooting myself in the foot by using a USB enclosure, and because FreeNAS (well, FreeBSD) is rightfully angry at said enclosure for not implementing the SCSI protocol correctly (...
1
vote
pf shortcuts for block quick
They are not. To be short, only two rules in the middle are valid, others are just a noise. from requires a pair of addresses and a to keyword, and the last rule is just a total nonense.
1
vote
Accepted
Default http proxy under FreeBSD
There's already an example of how to do this properly in the same file:
:setenv=MAIL=/var/mail/$,BLOCKSIZE=K:\
you need to use the setenv setting, which can be a comma-separated list.
:setenv=...
1
vote
Should I create ZFS zpools with whole disks or partitions?
in my head this question arises because of doubt if i late can designate, what is on that disk...
so when you create pool on whole drive (yes, with -f option, if needed), zpool practically create gpt ...
1
vote
Installing and setting up SVN on FreeBSD Server
The latest version is available as port and pre-built package.
To install the package,
sudo pkg install subversion
And make sure to read and follow the text with details.
1
vote
FreeBSD Jail own network stack with vimage
I'll dig up this bone for anyone who is curious. What I have done in the past is build a jail for each service I want isolated, and then ensure PF is running on the host (un-jailed). Then I can ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bsd × 108freebsd × 43
linux × 33
unix × 13
openbsd × 11
networking × 10
security × 7
firewall × 6
mac-osx × 6
zfs × 5
pf × 5
jail × 5
pfsense × 4
ssh × 3
debian × 3
performance × 3
filesystems × 3
nfs × 3
boot × 3
mysql × 2
apache-2.4 × 2
permissions × 2
routing × 2
bash × 2
postgresql × 2