Archives

Archive for the ‘Linux’ Category

IPTables allows you to easily setup rules for packet filtering/forwarding. So, to keep it short and simple: assume you’d like to forward any traffic coming to your machine (192.168.0.1) on port 80 to machine2 (192.168.0.2) on port 8080 then: – Enable port forwarding: echo 1 > /proc/sys/net/ipv4/ip_forward – Now add the rules: iptables -t nat [...]

May 18th, 2009 | Filed under Linux, Tips & Tricks

Whenever you upgrade your MySQL installation, make sure to upgrade any client that uses it. In some cases, clients that use a version prior to 4.1 will have a problem authenticating against the MySQL database if the latter has a post 4.1 version. The trick is that after 4.1 (i.e. 4.11 and up), MySQL changed [...]

Jan 2nd, 2009 | Filed under Linux, MySQL, Tips & Tricks

If you’re a regular vi user, you may have noticed that some files, when being edited in vi, contain ^M characters at line ends. This usually happens when you edit a file using certain windows-editors, then transfer it to your *nix machine. Luckily, it is easily to get rid of this control character. While in [...]

Jan 1st, 2009 | Filed under Linux

Sometime you may want to replace occurences of a string across multiple files. There is an easy way to do so with the help of the vi editor. This example will illustrate the power of vi: Suppose you have 100 .html files, and you want to replace the occurence of the string ’2007′ with ’2008′. [...]

Aug 9th, 2008 | Filed under Linux, Tips & Tricks

Some people may not be very knowledgeable about *nix file permissions, and what they mean, so this is intended to be some sort of a guide. Any file or folder has a permission associated to it. Look at it as: ‘who has the power over this file/folder, and what kind of power does he have’. [...]

Dec 16th, 2007 | Filed under Linux, Tips & Tricks

Many users run small networks, be it at home or work. One of the widely used techniques for sharing the internet connection over a small local area network is Microsoft’s ICS (Internet Connection Sharing). What if the main server is not running windows? Some prefer to opt for linux, and run several services that benefit [...]

Nov 9th, 2006 | Filed under Linux, Tips & Tricks
This blog is protected by Dave\\\\\\\'s Spam Karma 2: 14411 Spams eaten and counting...