To see which services are started up on boot, run the following: chkconfig –list systemctl list-unit-files
Category archives: Linux Tutorial
OpenVPN Listen on Port 443 (HTTPS)
The default port and protocol for OpenVPN is UDP/1194. Some server admins may block port 1194 so to get around this we can set OpenVPN to listen on port 443 instead. Port 443 is the default for HTTPS traffic so there is little chance it will be blocked. To install OpenVPN on CentOS I recommend […]
How to Un-ban an IP Blocked by Fail2Ban
When an IP is banned by Fail2Ban and you want to un-ban that IP, the command you need to run is: sudo fail2ban-client set <jailname> unbanip ipaddress You can get the jailname by running: sudo fail2ban-client status If you want to find what IPs are banned by Fail2Ban, you can check the IPTABLES by running: […]
Manually Updating Roundcube Webmail on cPanel Installation
cd <where-you-want-tarball-saved> wget <download-latest-version-here-http://roundcube.net/download/> tar xf roundcubemail-*.tar.gz cd <the-unpacked-roundcube-directory> bin/installto.sh /usr/local/cpanel/base/3rdparty/roundcube/config
MySQL 5 Commands
shell> sudo /Library/StartupItems/MySQLCOM/MySQLCOM start (Enter your password, if necessary) (Press Control-D or enter "exit" to exit the shell) You might want to add aliases to your shell’s resource file to make it easier to access commonly used programs such as mysql and mysqladmin from the command line. The syntax for bash is: alias mysql=/usr/local/mysql/bin/mysql alias […]
Backup Script
** UNTESTED ** #!/bin/sh # Remove previous backups to conserve on disk space rm -f /backups/* # Apt package list backup dpkg –get-selections > /backups/dpkg_list_`date +%Y-%m-%d`.txt # SQL dump mysqldump -u root -pMYPASSWORD –all-databases > /tmp/mysqlbak gzip /tmp/mysqlbak mv /tmp/mysqlbak.gz /backups/dbbackup_`date +%Y-%m-%d`.sql.gz # Filesystem backup tar cfj /backups/fsbackup_`date +%Y-%m-%d`.tar.bz2 /etc /var /home
vnStat and vnstat PHP Frontend Installation – CentOS
Yum installation yum install vnstat Edit configuration vim /etc/sysconfig/vnstat I only have one interface (eth0), you may have more (eth1 etc…) # see also: vnstat(1) # # starting with vnstat-1.6 vnstat can also be # configured via /etc/vnstat.conf # # the following sets vnstat up to monitor eth0 VNSTAT_OPTIONS="-u -i eth0" Edit configuration vim /etc/vnstat.conf […]
CSF Firewall Blocking VPN Internet Access
My CSF firewall seemed to be blocking internet access using my VPN. I could connect to it but could not use the internet connection. Here is a solution to the problem: Create File vim /etc/csf/csfpre.sh Insert This iptables -A INPUT -i eth0 -p tcp –dport 1723 -j ACCEPT iptables -A INPUT -i eth0 -p gre […]