How to save iptables persistently – easy way

Save current iptables settings using command iptables-save. We save it to /etc/network/iptables.v4.rules iptables-save > /etc/network/iptables.v4.rules Last we configure our box to restore it upon booting up the network interface. Configure your network interface file /etc/network/interfaces nano /etc/network/interfaces #under iface eth0 inet static .... pre-up iptables-restore < /etc/network/iptables.v4.rules tadaaa! short and...

Generating Certificates for MySQL Version: ‘5.5.40-0ubuntu0.14.04.1’

Generating SSL Certificates for MySQL Daemon using openssl. cd /etc/mysql # Generate a CA key and certificate with SHA1 digest openssl genrsa 2048 > ca-key.pem openssl req -sha1 -new -x509 -nodes -days 3650 -key ca-key.pem > ca-cert.pem # Create server key and certficate with SHA1 digest, sign it and convert # the RSA key from PKCS #8 (OpenSSL 1.0 and newer) to the old PKCS #1 format openssl req -sha1 -newkey rsa:2048 -days 730 -nodes -keyout server-key.pem > server-req.pem openssl x509 -sha1 -req -in server-req.pem -days 730 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > server-cert.pem openssl rsa -in server-key.pem -out server-key.pem # Create client key and certificate with SHA digest, sign it and convert # the RSA key from PKCS #8 (OpenSSL 1.0 and newer) to the old PKCS #1 format openssl req -sha1 -newkey rsa:2048 -days 730 -nodes -keyout client-key.pem > client-req.pem openssl x509 -sha1 -req -in client-req.pem -days 730 -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 > client-cert.pem openssl rsa -in client-key.pem -out client-key.pem # Ensure mysql user got the right access chown mysql:adm *.pem # Configure MySQL to use the certificates nano my.cnf add lines ssl=1 ssl-ca=/etc/mysql/ca-cert.pem ssl-cert=/etc/mysql/server-cert.pem ssl-key=/etc/mysql/server-key.pem service mysql restart [/code] tadaaa! hope this...

Edit crontab of another user (linux/ubuntu)

Root access or sudo rights is required to perform this. #crontab manpage crontab [ -u user ] { -l | -r [ -i ] | -e } #Example for editing crontab for user "anotheruser" sudo crontab -u anotheruser -e #Example for listing crontab for user "anotheruser" sudo crontab -u anotheruser...

SugarCRM read only field in edit view

How do I make a field in SugarCRM edit view read only? SugarCRM version >= 6.5 Add below configuration lines to  <sugarcrm root>/custom/Extension/modules/<your module name>/metadata/editviewdefs.php: 'displayParams' => array ( 'field' => array ( 'disabled' => 'disabled', ), ),...