check your:
-firewall configuration
-dns settings
-network adress
check your:
-firewall configuration
-dns settings
-network adress
If we have to install windows 7 virtual machine with virtualbox just enable IO APIC from virtual machine settings
aptitude install update-manager-core
vim /etc/update-manager/release-upgrades
we have to change Promt=lts to Promt=normal
sudo apt-get updade
do-release-upgrade -d
error: ‘system’ was not declared in this scope
we need
#include <cstdlib>
error: ‘fflush’ was not declared in this scope
error: ‘stdin’ was not declared in this scope
we need
include <cstdio>
when we are migrating source code from windows on linux machine g++ prints the following errors
error: ‘strlen’ was not declared in this scope
error: ‘strcpy’ was not declared in this scope
we have to add #include <cstring>
now, strlen() and strcpy() will work correctly
aptitude search mod-evasive
p libapache2-mod-evasive – evasive module to minimize HTTP DoS or brute force attacks
aptitude install libapache2-mod-evasive
mkdir -p /var/log/apache2/evasive
chown -R www-data:root /var/log/apache2/evasive/
vim /etc/apache2/mods-available/mod-evasive.load
LoadModule evasive20_module /usr/lib/apache2/modules/mod_evasive20.so
DOSHashTableSize 3097
DOSPageCount 5
DOSSiteCount 100
DOSPageInterval 2
DOSSiteInterval 2
DOSBlockingPeriod 600
DOSLogDir “/var/log/apache2/evasive”
DOSEmailNotify [email protected]
apachectl configtest
Syntax OK
apachectl restart
vim /etc/php5/conf.d/suhosin.ini
suhosin.session.encrypt = off
apachectl restart
aptitude install php5-mcrypt php5-imap php5-intl
vim /etc/php5/apache2/php.ini
date.timezone =Europe/Sofia
apachectl restart
tool for lazy admins 🙂
aptitude install dtrx
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