route flush
route add default 192.168.1.1
Category Archives: freebsd
How to backup your Mac OS X with Time Machine and FreeNAS
The search target requires INDEX-9. Please run make index or make fetchindex.
Solution:
# make fetchindex
/usr/ports/INDEX-9.bz2 100% of 1672 kB 194 kBps
Now, everything is OK
make search name=”tcpdump”
Port: p5-Net-TcpDumpLog-0.11
Path: /usr/ports/net/p5-Net-TcpDumpLog
Info: Read tcpdump/libpcap network packet logs
Maint: [email protected]
B-deps: perl-5.14.4
R-deps: perl-5.14.4
WWW: http://search.cpan.org/dist/Net-TcpDumpLog/
Port: tcpdump-4.4.0
Path: /usr/ports/net/tcpdump
Info: Ubiquitous network traffic analysis tool
Maint: [email protected]
B-deps: gettext-0.18.3 gmake-3.82_1 libiconv-1.14_1 libpcap-1.4.0 libsmi-0.4.8 pkgconf-0.9.2_1
R-deps: libpcap-1.4.0 libsmi-0.4.8 pkgconf-0.9.2_1
WWW:
Port: tcpdump398-1.0
Path: /usr/ports/net/tcpdump398
Info: Ubiquitous network traffic analysis tool – FreeBSD 7 version for FreeBSD 8
Maint: [email protected]
B-deps:
R-deps:
WWW:
FreeBSD ping: sendto: Permission denied
Please check your firewall
ipfw list
65535 deny ip from any to any
This is normally if you are compiled your kernel with
options IPFIREWALL
stop or edit your firewall settings.
/etc/rc.d/ipfw onestop
/etc/rc.d/pf onestop
Firewall redundancy with carp on FreeBSD 9.1
BGP: Assertion `ret != ((void *)0)’ failed in file bgp_attr.c, line 677, function bgp_attr_unintern
BGP: Assertion `ret != ((void *)0)’ failed in file bgp_attr.c, line 677, function bgp_attr_unintern
BGP: No backtrace available on this platform.
ZEBRA: client 15 disconnected. XXXXXX bgp routes removed from the rib
This is a crash log from quagga on freebsd.To solve the problem update your quagga version!!!
ssh server in freebsd howto
cd /usr/ports/security/openssh-portable
make config;make install clean
cp /etc/make.conf /etc/make.conf.old
echo “NO_OPENSSH = YES” >> /etc/make.conf
cd /etc/ssh/
cp sshd_config sshd_config.old
cp sshd_config-dist ssh_config
/etc/rc.d/sshd restart
Stopping sshd.
Starting sshd.
open /etc/rc.conf and add
sshd_enable=”YES”
install nano text editor in freebsd
cd /usr/ports/editors/nano
make install clean
ln -s /usr/local/bin/nano /usr/bin/nano
check linux configuration files syntax for errors
OpenSSH | /usr/sbin/sshd -t && echo $? /usr/sbin/sshd -T |
Apache | /usr/sbin/apache2 -t apachectl configtest |
nginx | /usr/local/nginx/sbin/nginx -t /usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf |
lighttpd | /usr/local/sbin/lighttpd -t -f /usr/local/etc/lighttpd/cyberciti.biz/lighttpd.conf |
Bind (named server config) | named-checkconf /etc/named.conf |
Bind (zone syntx) | named-checkzone cyberciti.biz /var/named/zone.cyberciti.biz |
Squid proxy | /usr/sbin/squid -k check /usr/sbin/squid -k parse |
MySQL server | mysqld –verbose –help /usr/libexec/mysqld –verbose –help 1>/dev/null |
Postfix MTA | postfix check postfix -vvv |
Samba SMB/CIFS | testparm -v |
tcpd | tcpdchk tcpdchk -v |
dhcpd (DHCP / BOOTP) server | dhcpd -t -cf /path/to/dhcpd.testing.conf |
vsftpd server | vsftpd -olisten=NO /path/to/vsftpd.testing.conf |
nagios | nagios -v /path/to/testing/nagios.cfg |
Openntpd NTPD server | ntpd -d -f /usr/local/etc/ntpd.conf -n |
Xorg (X11 Server) | Xorg -config /path/to/xorg.conf.new -retro |
syslogd / rsyslogd | rsyslogd -c4 -f /etc/rsyslog.testing.conf -N 1 |
CUPS Printing System | cupsd -f -c /path/to/cupsd.testing.conf -t |
slapd (OpenLDAP) | slapd -Tt |
varnishd | varnishd -C -f /path/to/wordpress.vlc |
exim MTA | exim -bV |
Bash/Ksh scripts | bash -n ./myscript ksh -n /path/to/script.ksh |
BSD pf firewall | pfctl -nf /etc/pf.conf |
proftpd | proftpd -t -c /path/to/proftpd.testing.conf |
Perl scripts | perl -c /path/to/script.pl perl -wc /path/to/script.pl |
http://www.cyberciti.biz/tips/check-unix-linux-configuration-file-for-syntax-errors.html
show progress copy bar when using dd
Копираме /dev/sda на /dev/sdb
pv -tpreb /dev/sda | dd of=/dev/sdb