FreeBSD
From Secure Computing Wiki
Revision as of 17:47, 23 November 2010 by Esubiguxoc (Talk | contribs)
Commands
This is a table of useful commands gleaned out of mailing lists and personal experience.
Command Description | Command |
---|---|
Find the date of the newest file in a directory. | awk -F^ '{ if ($1 > the_max) { the_max = $1; file_name = $2; } } END { print file_name }'</nowiki> |
tail -1 | awk '{print $6" "$7" "$8}'</nowiki> | |
md5 all files in <foo> directory and find matches | sort | uniq -c</nowiki> |
Remove IP from interface.<br /><i>This works for the primary IP on an interface, too.</i> | ifconfig <interface> <IP> -alias |
Management
- OpenLDAP
- Pure-FTPd: pam/ldap stuff goes in /etc/pam.d/pure-ftpd file!!!
- FreeBSD LDAP Auth (work in progress)
To enable passive mode for fetch when using pkg_add, sent the environment variable FTP_PASSIVE_MODE to something. If you use csh/tcsh, the following command will work: <pre># setenv FTP_PASSIVE_MODE 1</pre>
Networking
- IPv6 on FreeBSD 6.2
- IPv6 DNS
- DHCP6 Server on FreeBSD 6.2
- DHCP6 Client on FreeBSD 6.2
- Common Address Redundancy Protocol (CARP)
- OpenVPN Server
- Traffic Shaping with pf/ALTQ
- Bandwidth Monitoring with IPFW & Cacti
- NFS
- pf
Virtualization
- Setting up FreeBSD jails with ezjail
Ports/Applications
- You can look up what options were passed to configure at /var/db/ports/{prtname}/options.
Jails
Postgres
System V
In jails on 8.0-RELEASE+, the host system security.jail.sysvipc_allowed sysctl is ignored. You can override this and enabled it with the following command, after a jail has started: <pre>jail -m jid=<JID> allow.sysvipc=1</pre>
Errors
Error | Fix |
---|---|
Lookup of /dev for devfs, error: 2 | The /dev directory was deleted/can't be found on the root filesystem. Recreate, reboot. |