Creating a router on a CentOS 6 server

Assuming you want to NAT the network on eth1 and route the traffic to eth0 this is the spell: Create the forwarding rule: /sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE and then enable IP forwarding  echo “1” > /proc/sys/net/ipv4/ip_forward OR sysctl -w net.ipv4.ip_forward=1   Permanent setting using /etc/sysctl.conf If we want to make…

Windows time stamping in batch files

Creating a time-stamp  in windows can be usful for the automated backups we all SHOULD be doing 🙂   pkzip c:\<source>\*.* c:\<target>\TempZip.zip ren C:\<target>\TempZip.Zip c:\<target>\TempZip_%date:~-4,4%%date:~-7,2%%date:~-10,2%.zip   Or simply to create a directory for copying open files (Lawrence 🙂 ) set backdir=%date:~-4,4%%date:~-7,2%%date:~-10,2% mkdir %backdir% cd %backdir% etc..    

Allow remote SQL connection to Mysql from any host

Allowing the login of a user from any host in Mysql is simple: mysql> select host, user from mysql.user; +—————+——+ | host | user | +—————+——+ | 127.0.0.1 | root | | localhost | root | | minimal01.lan | root | +—————+——+ 3 rows in set (0.00 sec) mysql> update mysql.user set host=’%’ where host=’127.0.0.1′;…

CENTOS 6 Minimal does not have the Network interfaces up by default

So test drove CentOS  6 Minimum install .. Only real hiccup till now is : TUV ( the upstream vendor) aka RHEL decided to disable the network interfaces by default. WTF to that. A glance at the FAQ  will show the solution : Here’s my version for multiple interfaces.   # cd /etc/sysconfig/network-scripts/   # sed…

Enable grub menu UBUNTU

Enable grub menu: edit the /etc/default/grub  file and change the GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true to GRUB_HIDDEN_TIMEOUT=10 GRUB_HIDDEN_TIMEOUT_QUIET=false Save and call: sudo update-grub from a terminal, and reboot.

Manually reset the state of an instance

If an instance gets stuck in an intermediate state (e.g., “deleting”), you can manually reset the state of an instance using the nova reset-state command. This will reset it to an error state, which you can then delete. For example: $ nova reset-state c6bbbf26-b40a-47e7-8d5c-eb17bf65c485 $ nova delete c6bbbf26-b40a-47e7-8d5c-eb17bf65c485 You can also use the –active to force the instance back…

Common Errors and Fixes for OpenStack Compute

The Launchpad Answers site offers a place to ask and answer questions, and you can also mark questions as frequently asked questions. Credential errors, 401, 403 forbidden errors A 403 forbidden error is caused by missing credentials. Through current installation methods, there are basically two ways to get the novarc file. The manual method requires…