How to set speed Duplex on freebsd NIC? first check NIC speed duplex.. ifconfig em0 ifconfig | grep media Output: en0: flags=8843 mtu 1500 options=b inet 10.10.1.2 netmask 0xffffffc0 broadcast 10.10.1.29 ether 00:30:48:93:1e:9a media: autoselect (100baseTX) status: active ————————————————— 10Mbps full-duplex: ifconfig <interfacename> <ip address> media 10baseTX mediaopt full-duplex 100Mbps full-duplex: ifconfig <interfacename> <ip address> media 100baseTX [...]
Archive for the ‘Freebsd’ Category
Debian/Kfreebsd Source list. ############################################# deb http://security.debian.org/ squeeze/updates main deb-src http://security.debian.org/ squeeze/updates main deb http://ftp2.fr.debian.org/debian/ squeeze main contrib non-free deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free #############################################
This is simple code to grep file … This code using by other to grep squid configurations and other like apache.conf. # cat /etc/squid/squid.conf | sed ‘/ *#/d; /^ *$/d’ (thanks to kotnik for small sed trick) to safe file use this # cat /etc/squid/squid.conf | sed ‘/ *#/d; /^ *$/d’ > /etc/squid/squid.conf-new to view or search [...]
Simple Firewall http://cipitunk.wordpress.com/2008/07/31/simplify-your-firewall-rules/ Simple NAT http://cipitunk.wordpress.com/2007/11/07/nat-in-freebsd-with-pf/
Making FreeBSD load the IPNAT kernel module on bootup is easy, simply add this line to rc.conf: ipnat_enable=”YES” Create the IPNAT configuration file /etc/ipnat.rules Add the two lines in /etc/ipnat.rules that are for outgoing connections: map tun0 192.168.0.0/16 -> 0.0.0.0/32 portmap tcp/udp 40000:65000 map tun0 192.168.0.0/16 -> 0.0.0.0/32 Add any redirection lines you may want. [...]
Secure your apache and php by hide information of it. for debian / ubuntu root@webserv# pico /etc/apache2/conf.d/security ServerTokens Prod ServerSignature Off after that for php5 root@webserv#/etc/php5/apache2/php.ini find expose_php and closed it (default is on) expose_php off root@webserv# /etc/init.d/apache2 restart For freebsd webserv# pico /usr/local/etc/apache22/httpd.conf ServerTokens Prod ServerSignature Off after that for php5 webserv# pico [...]
Lighttpd – configure simple vhost multiple domain
Posted: February 12, 2011 in archlinux, Debian, Freebsd, SlackwareI’am suing Lighttpd for serve multiple domain … Always forget how to configure …. ## For 1 domain simple-vhost.server-root = “/var/www/servers/” simple-vhost.default-host = “kami337fm.com” simple-vhost.document-root = “pages” $HTTP["host"] == “kami337fm.com” { server.document-root = “/var/www/servers/news2.example.org/pages/” } ## For host www and without www (www.kami337fm.com & kami337fm.com) $HTTP["host"] =~ “(^|\.)kami337fm\.com$” { server.document-root = “/var/www/servers/news2.example.org/pages/” } ## For [...]
Using netstat find all proses and port root@firewall:~# netstat -tulpn find proses by port root@firewall:~# netstat -tulpn | grep :80 Using fuser command find out PID that open port ex: 80 root@firewall:~#fuser 80/tcp output 80/tcp: 539 and find proses name based on PID root@firewall:~# ls -l /proc/539/exe output lrwxrwxrwx 1 root root 0 2011-01-04 [...]
Install rootkit hunter on freebsd bsd# pkg_add -r rkhunter It will install rkhunter and issued this command bsd# echo ‘daily_rkhunter_check_enable=”YES”‘ >> /etc/periodic.conf bsd# echo ‘daily_rkhunter_update_enable=”YES”‘ >> /etc/periodic.conf it should run as a deamon..
Forward root mail from localhost to your gmail or whatever … *nix server always sent email about cron or anything than you have to read it. but how … ssh and issued this command bsd# mail than you can read your email. but if you wanna forward your email to gmail or yahoo or whatever. [...]

