<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;A0AMR3w6fyp7ImA9WxJXGUw.&quot;"><id>tag:blogger.com,1999:blog-18330441</id><updated>2009-06-13T16:03:06.217-03:00</updated><title>Linux Server Security Secrets and Administration</title><subtitle type="html">Linux Security and Administration with programming</subtitle><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://serverlinux.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>88</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="self" href="http://feeds.feedburner.com/LinuxServer" type="application/atom+xml" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site, subject to copyright and fair use.</feedburner:browserFriendly><entry gd:etag="W/&quot;A0AMR3w5eyp7ImA9WxJXGUw.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-134243884892528486</id><published>2009-06-13T14:48:00.003-03:00</published><updated>2009-06-13T16:03:06.223-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-13T16:03:06.223-03:00</app:edited><title>Setup more than one sshd daemon in one box</title><content type="html">You have one Linux server and want to set two ssh daemon, may be two different ssh servers each with a different version.&lt;br /&gt;&lt;br /&gt;1) Download the openssh from http://www.openssh.org/portable.html&lt;br /&gt;&lt;br /&gt;2) Configure and make the sources:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# ./configure --with-kerberos5 --with-tcp-wrappers&lt;/span&gt; --with-pam&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# ./make&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2.1) Common errors:&lt;br /&gt;&lt;pre&gt;"configure: error: PAM headers not found"&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;Solution: yum install pam-devel&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;3) You can do a "make install" but i wouldn't do that if you have already an ssh daemon installed, from sources or any package manager like rpm or apt.&lt;br /&gt;&lt;br /&gt;4) Copy the ssh daemon directory or link to it from /usr/local/sbin/&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# ln -s ./openssh-new /usr/local/sbin/sshd-new/&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5) Supposing that you already have a /etc/ssh/sshd_config file, then you have to create&lt;br /&gt;another configuration file for the new ssh server, lets put it in another directory:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;/usr/local/etc/ssh/sshd_config&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And edit this sshd_config file and put there this line, or edit it if it already exists:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# This line specifies which port you want to use:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Port 2253 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;6) Create the ssh key files:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# ssh-keygen -t rsa -f /usr/local/etc/ssh/ssh_host_rsa_key&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# ssh-keygen -t dsa -f /usr/local/etc/ssh/ssh_host_dsa_key&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;7) Make sure that in the startup script /etc/init.d/sshd2 you instruct the daemon where to find its key files, something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;# Some functions to make the below more readable&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;KEYGEN=/usr/local/sbin/openssh-5.2p1/ssh-keygen&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SSHD=/usr/local/sbin/openssh-5.2p1/sshd&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;RSA1_KEY=/usr/local/etc/ssh/ssh_host_key&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;RSA_KEY=/usr/local/etc/ssh/ssh_host_rsa_key&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;DSA_KEY=/usr/local/etc/ssh/ssh_host_dsa_key&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;PID_FILE=/var/run/sshd2.pid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;OPTIONS="-f /usr/local/etc/ssh/sshd_config"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;8) Finally, start the new ssh server.&lt;br /&gt;/etc/init.d/sshd2 start&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-134243884892528486?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/134243884892528486/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=134243884892528486&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/134243884892528486?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/134243884892528486?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/AuYLjU_SrgY/setup-more-than-one-sshd-daemon-in-one.html" title="Setup more than one sshd daemon in one box" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2009/06/setup-more-than-one-sshd-daemon-in-one.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMDRn48fSp7ImA9WxJXGEw.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-5165062018290672481</id><published>2009-06-12T11:00:00.004-03:00</published><updated>2009-06-12T11:21:17.075-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-06-12T11:21:17.075-03:00</app:edited><title>Public key for  is not installed</title><content type="html">The .rpm package has been signed with a private key to provide nonrepudiation and integrity, basically, its genuinety.  The package should be verified with the public key.&lt;br /&gt;&lt;br /&gt;You can use rpm to install the package:&lt;br /&gt;&lt;br /&gt;# rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5&lt;br /&gt;&lt;pre&gt;&lt;span style="font-family: Georgia,serif;"&gt;&lt;br /&gt;&lt;/span&gt;# yum install ./mysqlclient10-3.23.58-9.2.c4.x86_64.rpm&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-5165062018290672481?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/5165062018290672481/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=5165062018290672481&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/5165062018290672481?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/5165062018290672481?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/AhW1HLEjMM0/public-key-for-is-not-installed.html" title="Public key for &lt;rpm-package&gt; is not installed" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2009/06/public-key-for-is-not-installed.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMFRXYyeCp7ImA9WxVUE08.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-9024871916698876712</id><published>2009-03-17T18:09:00.002-03:00</published><updated>2009-03-17T18:13:34.890-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2009-03-17T18:13:34.890-03:00</app:edited><title>Creating a VIP on Linux</title><content type="html">If you want to have two or more ip addresses on one physical interface, in Linux, there are many ways to do it, but to have a change permanent you have to do these steps on Redhat Linux and probably other distros:&lt;br /&gt;&lt;br /&gt;Make a copy from the physical interface startup config file:&lt;br /&gt;cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0:0&lt;br /&gt;&lt;br /&gt;Modify the /etc/sysconfig/network-scripts/ifcfg-eth0:0&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DEVICE=eth0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;BOOTPROTO=static&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;HWADDR=00:53:52:A2:43:43&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;IPADDR=192.168.100.30&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;NETMASK=255.255.255.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ONBOOT=yes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;TYPE=Ethernet&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MACADDR=00:53:52:A2:43:43&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Finaly, do a :&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# ifup eth0:0&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-9024871916698876712?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/9024871916698876712/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=9024871916698876712&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/9024871916698876712?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/9024871916698876712?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/y83rZrmZAVY/creating-vip-on-linux.html" title="Creating a VIP on Linux" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2009/03/creating-vip-on-linux.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkYFR3c4cCp7ImA9WxRaEU4.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-5280325506186630221</id><published>2008-12-13T00:07:00.003-02:00</published><updated>2008-12-13T00:08:36.938-02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-13T00:08:36.938-02:00</app:edited><title>/usr/lib64: file not recognized: Is a directory</title><content type="html">I have seen this error several times when compiling and the solution is always the same:&lt;br /&gt;&lt;br /&gt;Edit the Makefile and replace:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;LDFLAGS = -L /usr/lib64&lt;/span&gt;&lt;br /&gt;for:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;LDFLAGS = -L/usr/lib64&lt;/span&gt;&lt;br /&gt;(remove the space between the -L and /usr/lib64)&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-5280325506186630221?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/5280325506186630221/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=5280325506186630221&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/5280325506186630221?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/5280325506186630221?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/8VuNwp6IJPc/usrlib64-file-not-recognized-is.html" title="/usr/lib64: file not recognized: Is a directory" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/12/usrlib64-file-not-recognized-is.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YDQ3w-fyp7ImA9WxRaEUw.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-1399496122646549514</id><published>2008-12-12T16:15:00.003-02:00</published><updated>2008-12-12T19:59:32.257-02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-12T19:59:32.257-02:00</app:edited><title>Error with PHP and Mysql</title><content type="html">&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;Seems that this errors come because of incompatibility between i386 and x64.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;&lt;/span&gt;&lt;br /&gt;# cd /usr/lib/mysql&lt;br /&gt;# ln -s ../../lib64/mysql/libmysqlclient.so&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;If this do not works, you can patch the Makefile to use the x64 version of the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:arial;" &gt;libraries instead of the x32:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;# sed -i -e 's@-L/usr/lib/mysql@-L/usr/lib64/mysql@g' Makefile&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-1399496122646549514?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/1399496122646549514/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=1399496122646549514&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/1399496122646549514?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/1399496122646549514?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/cgQ1uAjPoyA/error-with-php-and-mysql.html" title="Error with PHP and Mysql" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/12/error-with-php-and-mysql.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYFQXcycCp7ImA9WxRaEEg.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-462683426675386689</id><published>2008-12-12T00:46:00.002-02:00</published><updated>2008-12-12T00:48:30.998-02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-12T00:48:30.998-02:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Administration" /><title>Error starting snmp on Centos.</title><content type="html">&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:arial;"&gt;/usr/sbin/snmpd: symbol lookup error: /usr/sbin/snmpd: undefined symbol: smux_snmp_select_list_get_length&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;Resolution:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;yum update net-snmp-libs&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-462683426675386689?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/462683426675386689/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=462683426675386689&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/462683426675386689?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/462683426675386689?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/iPIhrfFMgCI/error-starting-snmp-on-centos.html" title="Error starting snmp on Centos." /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/12/error-starting-snmp-on-centos.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AGQnk9eCp7ImA9WxdaFkQ.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-59979900665765709</id><published>2008-08-25T18:27:00.000-03:00</published><updated>2008-08-25T18:28:43.760-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-25T18:28:43.760-03:00</app:edited><title>The Linux Knowledge Base and Tutorial</title><content type="html">Looking for an in-depth and easy-to-understand introduction to Linux? Then look no further!&lt;br /&gt;We don't just show you how to execute a handful of commands and use a few utilities. The Linux Tutorial goes beyond the basics, providing you with the knowledge necessary to get the most out of your Linux system.&lt;br /&gt;&lt;br /&gt;[...] Keep reading in: &lt;a href="http://www.linux-tutorial.info/"&gt;Linux Knowledge Base and Tutorial&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-59979900665765709?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/59979900665765709/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=59979900665765709&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/59979900665765709?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/59979900665765709?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/hdEdBU9z-pM/linux-knowledge-base-and-tutorial.html" title="The Linux Knowledge Base and Tutorial" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/08/linux-knowledge-base-and-tutorial.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QAQXc8fyp7ImA9WxdaFE0.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-2923991836394412488</id><published>2008-08-22T09:45:00.003-03:00</published><updated>2008-08-22T09:49:00.977-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-22T09:49:00.977-03:00</app:edited><title>100 Tips and Tools to Set Up Your Own Home LAMP Server</title><content type="html">LAMP (Linux, Apache, MySQL and PHP) servers are very popular for their ease of use and flexibility. They’re also easy to initiate, because the components are easy to aquire and there’s a lot of documentation available to help with getting started. Read on to find some of the best resources available for creating your own home LAMP server, from installation to maintenance.&lt;br /&gt;[...]&lt;br /&gt;Keep reading in:&lt;br /&gt;&lt;a href="http://www.great-isp-deals.com/blog/2008/08/100-tips-and-tools-to-set-up-your-own-home-lamp-server/" target="_new"&gt; 100 Tips and Tools to Set Up Your Own Home LAMP Server&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-2923991836394412488?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/2923991836394412488/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=2923991836394412488&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/2923991836394412488?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/2923991836394412488?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/4eT1-PXG_XI/100-tips-and-tools-to-set-up-your-own.html" title="100 Tips and Tools to Set Up Your Own Home LAMP Server" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/08/100-tips-and-tools-to-set-up-your-own.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YASH09eSp7ImA9WxdaEUo.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-4858659076597813096</id><published>2008-08-19T16:41:00.002-03:00</published><updated>2008-08-19T16:45:49.361-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-19T16:45:49.361-03:00</app:edited><title>Recover /etc/fstab file</title><content type="html">If you have deleted the /etc/fstab file it is possible to recover it in the following way:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;cat /proc/mounts &gt; /etc/fstab&lt;br /&gt;chmod 644 /etc/fstab&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The "proc" filesystem, which is /proc/mounts, is used to handle sytem configuration parameters, it is a virtual filesystem.&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-4858659076597813096?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/4858659076597813096/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=4858659076597813096&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/4858659076597813096?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/4858659076597813096?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/NOEDz8TenNg/recover-etcfstab-file.html" title="Recover /etc/fstab file" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/08/recover-etcfstab-file.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A08BRnY7eyp7ImA9WxdaEEQ.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-3990796254131310849</id><published>2008-08-18T19:46:00.003-03:00</published><updated>2008-08-18T19:50:57.803-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-08-18T19:50:57.803-03:00</app:edited><title>Managing links in Linux</title><content type="html">Hard and Symbolic links are the two types of files that exist in a Unix Operating System to point to another file. &lt;p&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Hard Links&lt;/strong&gt;&lt;/span&gt;: They are a pointer that is exactly as the same than the file it points to, no mather if it has a different name, any modification done to the pointer are also done to the target file. The hard links can only point to other files, but not directories (though directories are a special kind of files). And the other main difference with Symbolic Links is that hard links MUST reside in the same filesystem than the file they point to, because they have the same inode number.&lt;/p&gt; &lt;p&gt;&lt;span style="text-decoration: underline;"&gt;&lt;strong&gt;Symbolic liks&lt;/strong&gt;&lt;/span&gt;: The are a pointer to another file but they contain the name of the file they point to, it can span filesystems (they have a different inode number), and they can point to files or direcoties.&lt;/p&gt; Creating Hard and Symbolic Links:&lt;br /&gt;ln -fs &amp;lt;source&amp;gt; [&amp;lt;target&amp;gt;]&lt;br /&gt;&lt;br /&gt;By default ln (without arguments) it creates hard links.&lt;br /&gt;&lt;span style="font-size:85%;"&gt;-f, --force : Remove existing destination files.&lt;br /&gt;-s, --symbolic : Make symbolic links instead of hard links.&lt;/span&gt;&lt;/target&gt;&lt;/source&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-3990796254131310849?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/3990796254131310849/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=3990796254131310849&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/3990796254131310849?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/3990796254131310849?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/ZfffuNXukWk/managing-links-in-linux.html" title="Managing links in Linux" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/08/managing-links-in-linux.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CE4GQ3Y_cCp7ImA9WxdXGEk.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-6017034653847961486</id><published>2008-06-30T13:19:00.002-03:00</published><updated>2008-06-30T13:22:02.848-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-30T13:22:02.848-03:00</app:edited><title>Using wget behind a proxy in Linux</title><content type="html">If you are behind a proxy and would like to download a file, you could do this by issuing this commands:&lt;br /&gt;&lt;br /&gt;export http_proxy=proxy.anonymous.com:8080&lt;br /&gt;export use_proxy=on&lt;br /&gt;wget http://www.serversolaris.com/Crypt-SSLeay.tgz&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-6017034653847961486?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/6017034653847961486/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=6017034653847961486&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6017034653847961486?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6017034653847961486?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/nP4fq67KdHE/using-wget-behind-proxy-in-linux.html" title="Using wget behind a proxy in Linux" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/using-wget-behind-proxy-in-linux.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkYESXcyeCp7ImA9WxdXGEk.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-3410628156757580226</id><published>2008-06-30T12:19:00.003-03:00</published><updated>2008-06-30T12:35:08.990-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-30T12:35:08.990-03:00</app:edited><title>A strong Unix Password</title><content type="html">The strong of a cryptographic solution is not recommended to be into the obscurity of the algorithm, the most usefull and most hard to vulnere solutions are public algorithms, which everybody can see, for example PKI, CAST, PGP, all them are public.&lt;br /&gt;So.. the obvious hard point of a security system is a strong password, they part of the mechanism that no other knows.  The password could be interpreted as something you know, you have, something that uniquely identifies you or a combination of these.&lt;br /&gt;&lt;br /&gt;But taking in consideration just a password (something you know) i would like to share some best practices in Linux.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;DON'T DO THIS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;A password of less than 8 characters is easily breaked by brute force attack.  You can set the PASS_MIN_LENGTH in /etc/login.defs file to force long enough passwords.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Don't use words that can be found in a dictionary or encyclopedy of any existing language, a good technique would be to input the password in "google" and see if something was found :-)&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Don't use any personal detail (phone, ages, names, etc).&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Any combination of these.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(51, 51, 255);"&gt;THESE METHODS ARE MORE EFFECTIVE:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Replace letters with numbers, for example "3" for "e", "4" for "A", "7" for "T".&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Create a mnemonic from a phrase only you know, for example "i like linux and security" would be converted in "illas", add some numbers and your password would be secure, remember to use a larger than 8 digits password.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Mix uppercase and lowercase letters&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Use special characters: "-", "!", ":", "@".&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;In Linux or Solaris it is possible to create secure passwords with the "mkpasswd" utility.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# mkpasswd -l 20&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;jnXbrScbzbtnwqg99hho&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-3410628156757580226?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/3410628156757580226/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=3410628156757580226&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/3410628156757580226?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/3410628156757580226?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/2k8vz30XVaU/strong-unix-password.html" title="A strong Unix Password" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/strong-unix-password.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkAESHg6fip7ImA9WxdXFkQ.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-6745028522327147701</id><published>2008-06-24T23:08:00.005-03:00</published><updated>2008-06-28T21:18:29.616-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-28T21:18:29.616-03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Administration" /><title>Forcing logrotation with logrotate</title><content type="html">In my previous post i explained how to setup a simple logrotation (&lt;a href="http://serverlinux.blogspot.com/2006/02/logrotate-in-linux.html"&gt;http://serverlinux.blogspot.com/2006/02/logrotate-in-linux.html&lt;/a&gt;), now i would like to show a simple but usefull command that forces the logrotation, independent of the normal execution.&lt;br /&gt;&lt;br /&gt;# logrotate -f /etc/logrotate.conf&lt;br /&gt;&lt;br /&gt;For more information, see "man logrotate". LOGROTATE(8).&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-6745028522327147701?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/6745028522327147701/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=6745028522327147701&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6745028522327147701?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6745028522327147701?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/FWSTjSz9leo/forcing-logrotation-with-logrotate.html" title="Forcing logrotation with logrotate" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/forcing-logrotation-with-logrotate.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkAGRn09eCp7ImA9WxdXFkQ.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-3440969599935050737</id><published>2008-06-23T21:57:00.007-03:00</published><updated>2008-06-28T21:18:47.360-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-28T21:18:47.360-03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><title>10 most important Unix Security issues</title><content type="html">A good place for security education is the SANS/FBI site (&lt;i class="emphasis"&gt;&lt;a target="_top" class="url" href="http://www.sans.org/top20/"&gt;http://www.sans.org/top20/&lt;/a&gt;&lt;span class="url"&gt;).  These are the most important Unix related security issues:&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;1. Web Server.  One of the places that an intruder is going to check first is for vulnerabilities in your Apache version and in you cgi-scripts.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;2. Remote Procedure Calls.  RPC Services should be down if they are not required, they allow a remote user to execute instructions in your computer; the intruder usualy gains root access this way.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style="font-size:100%;"&gt;&lt;i class="emphasis"  style="font-family:arial;"&gt;&lt;span class="url"&gt;3. SNMP (Simple Network Management Protocol).  This protocol is known to have had its vulnerabilities and their password can be easily cracked and more easier captured from the network.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;i class="emphasis"&gt;&lt;span class="url"&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family:arial;"&gt;4. SSH (Secure Shell).  SSH has been exploited before, if you do not need it then you can turn it off, or filter the source ip addresses with &lt;/span&gt;&lt;a style="font-family: arial;" href="http://serverlinux.blogspot.com/2007/11/configure-tcp-wrappers-in-linux.html"&gt;TCP Wrapper&lt;/a&gt;&lt;span style="font-family:arial;"&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;5. Remote Services (Trusted host).  This was a setup in the machines based on the rely of other machines IP address, and leaved access without asking password.  Their binaries are "rsh", "rcp", "rlogin" and "rexec".  They exist and can be used also today, the attacked can do a party with your machine if they use a technique known as "ip spoofing".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;6. FTP (File Transfer Protocol). Many vulnerabilities have been found in FTP, as exploits and protocol weaknesses, like clear text password transfer (resolved in SFTP).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;7. LPD (Line Printer Daemon).  This daemon is also remotely exploitable with help of an overflow and a shellcode, gaining root access if the server is running as root.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;8. BIND/DNS (Dynamic Name Server).  DNS Flooding, exploits and other attacks are available, if you are going to set up a DNS, use a firewall to filter any port that you do not want.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;9. Sendmail. This mail transfer agent is known for its buffer overflows and remote exploits, though it has resolved its issues, always appears something new.  It is recommended to use qmail.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;10. Weak Password / No Passwords in the system.  I do not need to explain this.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Many people that talk about security talk about a false sense of security that one can have in the cyberspace, i do not totaly agree with them, i see very often thay it is created a false sense of insecurity also.  The items i have listed before create some sense of insecurity and alert; but do not worry, if you are going to run one of this critical services, just keep in mind:&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;* Use a &lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(255, 0, 0);"&gt;well configured&lt;/span&gt;&lt;/span&gt; firewall (pay more attention to "well configured" than "firewall")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;* Set up &lt;span style="color: rgb(255, 0, 0);font-size:130%;" &gt;correctly&lt;/span&gt; an Intrusion Detection and Prevention System.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;* Ask for help a security professional, here in Argentina we have very good ones :-)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-3440969599935050737?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/3440969599935050737/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=3440969599935050737&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/3440969599935050737?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/3440969599935050737?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/u1sy76hKsdA/10-most-important-unix-security-issues.html" title="10 most important Unix Security issues" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/10-most-important-unix-security-issues.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4DSHk8fyp7ImA9WxdXEUs.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-9049172691050201246</id><published>2008-06-21T12:49:00.001-03:00</published><updated>2008-06-22T17:02:59.777-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-22T17:02:59.777-03:00</app:edited><title>Find out the php.ini location in your LAMP setup</title><content type="html">In the command line write:&lt;br /&gt;&lt;br /&gt;echo "&amp;lt;?php phpinfo(); ?&amp;gt;" | php | grep php.ini&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-9049172691050201246?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/9049172691050201246/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=9049172691050201246&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/9049172691050201246?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/9049172691050201246?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/FdZdbN_MzLI/find-out-phpini-location-in-your-lamp.html" title="Find out the php.ini location in your LAMP setup" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/find-out-phpini-location-in-your-lamp.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkAARH0zeip7ImA9WxdXFkQ.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-8865680978280622397</id><published>2008-06-20T12:52:00.003-03:00</published><updated>2008-06-28T21:19:05.382-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-28T21:19:05.382-03:00</app:edited><category scheme="http://www.blogger.com/atom/ns#" term="Security" /><title>How to enable shadow passwords in Linux</title><content type="html">It is important that you use shadow passwords, because this puts another layer of security against password cracking and also enable the possibility to set policies about how often the password must be modified.&lt;br /&gt;&lt;br /&gt;Using the Linux &lt;a href="http://tldp.org/HOWTO/Shadow-Password-HOWTO-3.html"&gt;Shadow Suite&lt;/a&gt;&lt;br /&gt;I am going to show you the "&lt;span style="font-family:courier new;"&gt;chage&lt;/span&gt;" command, it changes the number of days between password changes and the date of the last password change.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;chage [-m mindays] [-M maxdays] [-d lastday] [-I inactive] [-E expiredate] [-W warndays] user&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is not recommended to modify the /etc/passwd or /etc/shadow file because this could result in the corruption if at the same time another process writes the files.  To modify the /etc/passwd file, use the &lt;a href="http://manpages.unixforum.co.uk/man-pages/linux/opensuse-10.2/8/vipw-man-page.html"&gt;vipw&lt;/a&gt; command:&lt;br /&gt;&lt;br /&gt;Vipw edits the password file after setting the appropriate locks, and does any necessary processing after the password file is unlocked. If the password file is already locked for editing by another user, vipw will ask you to try again later. The default editor for vipw is vi(1).&lt;br /&gt;&lt;br /&gt;To list the users password expiration settins:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;        $ chage -l walter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Minimum:           0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Maximum:           99999&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Warning:           6&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Inactive:          -1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Last Change:       Apr 09, 2004&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Password Expires:  Never&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Password Inactive: Never&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        Account Expires:   Never&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Suggestions:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style="font-family:arial;"&gt;* Set the minimum password lenght to eight characters.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;    * Force the users to change their passwords every four to six weeks.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-8865680978280622397?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/8865680978280622397/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=8865680978280622397&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/8865680978280622397?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/8865680978280622397?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/1NTW64eryFg/how-to-enable-shadow-passwords-in-linux.html" title="How to enable shadow passwords in Linux" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/how-to-enable-shadow-passwords-in-linux.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4MQns7eSp7ImA9WxRbGEU.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-6789140424064069360</id><published>2008-06-19T13:12:00.004-03:00</published><updated>2008-12-10T02:56:23.501-02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-10T02:56:23.501-02:00</app:edited><title>Introduction to Iptables (Part 3)</title><content type="html">In this case i am going to explain some iptables features related with UDP.  UDP (&lt;span style="color: rgb(51, 51, 255);"&gt;User Datagram Protocol&lt;/span&gt;) has the characteristic of being connectionless.&lt;br /&gt;&lt;br /&gt;The packets format is this:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1Xv_rWPOo3A/SFqG0h18dNI/AAAAAAAAAQ8/1KsSHhq41b0/s1600-h/udp_1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_1Xv_rWPOo3A/SFqG0h18dNI/AAAAAAAAAQ8/1KsSHhq41b0/s320/udp_1.JPG" alt="" id="BLOGGER_PHOTO_ID_5213627755630720210" border="0" /&gt;&lt;/a&gt;In this packet format can be seen that UDP has no flags like TCP.  UDP cares only about the source and destination addresses.&lt;br /&gt;&lt;br /&gt;In Iptables, udp is specified with the "-p udp" argument.  Similar rules apply to udp than with TCP matching, negation and port ranges are allowed:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;-sport (--source-port)&lt;/span&gt; &amp;lt;port&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;--dport (--destination-port)&lt;/span&gt; &amp;lt;port&gt;&lt;br /&gt;&lt;br /&gt;This rule matches any UDP packet with source port of 161 (SNMP)&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;iptables -A INPUT -p udp --sport 161 -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This rule logs all the packets with destination port with range from 161 to 180&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;iptables -A INPUT -p udp --dport 161:180 -j LOG&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To learn more about UDP, see the &lt;a href="http://www.faqs.org/rfcs/rfc768.html"&gt;RFS 768&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-6789140424064069360?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/6789140424064069360/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=6789140424064069360&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6789140424064069360?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6789140424064069360?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/9Qg4bhosq3U/introduction-to-iptables-part-3.html" title="Introduction to Iptables (Part 3)" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_1Xv_rWPOo3A/SFqG0h18dNI/AAAAAAAAAQ8/1KsSHhq41b0/s72-c/udp_1.JPG" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/introduction-to-iptables-part-3.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4MQng9fyp7ImA9WxRbGEU.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-6380040788440743619</id><published>2008-06-18T09:41:00.004-03:00</published><updated>2008-12-10T02:56:23.667-02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-10T02:56:23.667-02:00</app:edited><title>Introduction to Iptables (Part 2)</title><content type="html">In my &lt;a href="http://serverlinux.blogspot.com/2008/06/introduction-to-iptables-usage-in-linux.html"&gt;previous post&lt;/a&gt; i explained some general packet matching with Iptables, now i am going to explain the &lt;span style="color: rgb(255, 102, 0); font-weight: bold;"&gt;TCP packet matching generalities&lt;/span&gt;, where the commands displayed following, all match specific values from the TCP packet headers, for example the source and destination ports, tcp options, tcp flags (for example the syn, fin, etc).&lt;br /&gt;&lt;br /&gt;You use the &lt;span style="font-family:courier new;"&gt;--protocol&lt;/span&gt; argument to match TCP packets, and optionally, the source port of the packet can be specified with "&lt;span style="font-family:courier new;"&gt;--sport (--source-port) &lt;port&gt;&lt;/span&gt;", the source port can be a numeric value or the name of the port, that should match the port number we want in the &lt;span style="font-family:courier new;"&gt;/etc/services&lt;/span&gt; file.&lt;br /&gt;&lt;br /&gt;Here are two examples:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;iptables -A INPUT -p tcp --sport 23 -j REJECT&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;iptables -A INPUT -p tcp --sport telnet -j REJECT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This rules do the same, they reject the inbound traffic from the TCP port 23 of the remote host).  The usage of port names instead of the number, creates a little more cpu consume and could be told as "speed penalty" in large rulesets.&lt;br /&gt;&lt;br /&gt;It is possible also to specify a range of ports in the rules, lower and upper port separated by a colon.  Here i filter all the ports between 10 and 999:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;iptables -A OUTPUT -p tcp --sport 10:999 -j REJECT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;All TCP source ports except the 80 are accepted with this rule:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;iptables -A INPUT -p tcp --sport ! 80 -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The same can be done with a range of ports:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;iptables -A INPUT -p tcp --sport ! 1024:40000 -j LOG&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If the first port is numerically higher than the second, iptables swaps both numbers around automatically.&lt;br /&gt;&lt;br /&gt;To specify a TCP destination port, the "&lt;span style="font-family:courier new;"&gt;-dport (--destination-port) [port]&lt;/span&gt;" is used, and its rules are the same than in TCP source port matching.&lt;br /&gt;&lt;br /&gt;For example, to stop users in your private network to connect to IRC, supposing that IRC uses the ports between 6667 to 66670, you may want to add this rule:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;iptables -A OUTPUT -p tcp --dport 6667:6670 -j REJECT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To match a specific flag in the TCP header, you have to make use of "&lt;span style="font-family:courier new;"&gt;--tcp-flags [mask] [flags]&lt;/span&gt;".&lt;br /&gt;&lt;br /&gt;The &lt;span style="font-family:courier new;"&gt;[mask] &lt;/span&gt;argument is a list of flags separated by commas, which should be matched.&lt;br /&gt;The &lt;span style="font-family:courier new;"&gt;[flags] &lt;/span&gt;argument is a list of flags that must be set, any flag listed in the [mask] argument, but not in the second, this means that the flag must be unset.&lt;br /&gt;&lt;br /&gt;The possible flags are: SYN, ACK, FIN, RST, PSH and URG.  ALL and NONE are also possible.&lt;br /&gt;&lt;br /&gt;In this example, the SYN,ACK and FIN flags are the mask, and the SYN flag is the one that has to be set:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;iptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN SYN -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The mask can also be inverted, meaning  that the ACK and FIN should be set, but not the SYN:&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;iptables -A FORWARD -p tcp --tcp-flags ! SYN,ACK,FIN SYN -j ACCEPT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Matching a particular TCP flag:&lt;br /&gt;This is accomplished with the "&lt;span style="font-family:courier new;"&gt;--syn&lt;/span&gt;" flag, it is usefull because the SYN flag is the TCP start sequence also known as the "3 way handshake", explained in this picture:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1Xv_rWPOo3A/SFkDggfZ3OI/AAAAAAAAAQo/rGhdCf3SpXA/s1600-h/tcp-start.gif"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_1Xv_rWPOo3A/SFkDggfZ3OI/AAAAAAAAAQo/rGhdCf3SpXA/s320/tcp-start.gif" alt="" id="BLOGGER_PHOTO_ID_5213201900670409954" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family:courier new;"&gt;iptables -A FORWARD -p tcp --syn -j ACCEPT&lt;/span&gt; &lt;span style="font-family:courier new;"&gt;iptables -A FORWARD -p tcp ! --syn -j ACCEPT&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-6380040788440743619?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/6380040788440743619/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=6380040788440743619&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6380040788440743619?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6380040788440743619?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/0Wh3zzEN4IM/introduction-to-iptables-part-2.html" title="Introduction to Iptables (Part 2)" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_1Xv_rWPOo3A/SFkDggfZ3OI/AAAAAAAAAQo/rGhdCf3SpXA/s72-c/tcp-start.gif" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/introduction-to-iptables-part-2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEMGQXk7fip7ImA9WxdXEE0.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-6207552280599134059</id><published>2008-06-18T00:23:00.005-03:00</published><updated>2008-06-20T19:53:40.706-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-20T19:53:40.706-03:00</app:edited><title>Creating a complete LAMP solution in Centos Linux</title><content type="html">Download Apache: httpd-2.2.9.tgz&lt;br /&gt;Download PHP: php-5.2.6.tgz&lt;br /&gt;&lt;br /&gt;Uncompress and compile Apache:&lt;br /&gt;./configure --with-pgsql --with-apxs2=/usr/local/apache/bin/apxs --with-xml --disable-dom --without-pear --with-pgsql --with-gd --with-zlib --enable-sockets&lt;br /&gt;&lt;br /&gt;Uncompress and compile PHP:&lt;br /&gt;./configure --with-pgsql --with-apxs2=/usr/local/apache/bin/apxs --with-xml --disable-dom --without-pear --with-pgsql --with-gd --with-zlib --enable-sockets --with-mysql&lt;br /&gt;&lt;br /&gt;If you get this message:&lt;br /&gt;If configure fails try --with-jpeg-dir==[dir]&lt;br /&gt;configure: error: libpng.(a|so) not found.&lt;br /&gt;&lt;br /&gt;Do the following:&lt;br /&gt;Download libpng-1.2.29.tar.bz2 from http://www.libpng.org/pub/png/libpng.html&lt;br /&gt;Uncompress and:&lt;br /&gt;cd libpng-1.2.29&lt;br /&gt;cp scripts/makefile.linux Makefile&lt;br /&gt;make prefix=/usr &amp;amp;&amp;amp; make install&lt;br /&gt;&lt;br /&gt;Download http://www.zlib.net/zlib-1.2.3.tar.gz, uncompress it, then:&lt;br /&gt;cd zlib-1.2.3&lt;br /&gt;./configure --prefix=/usr &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;&lt;br /&gt;To add jpeg support to PHP, download jpegsrc.v6b.tar.gz from ftp://ftp.uu.net/graphics/jpeg/&lt;br /&gt;Uncompress it and: jpeg-6b]# ./configure --prefix=/usr &amp;amp;&amp;amp; make &amp;amp;&amp;amp; make install&lt;br /&gt;&lt;br /&gt;Now configure PHP with jpeg and postgresql support:&lt;br /&gt;./configure --with-pg --with-apxs2=/usr/local/apache/bin/apxs --disable-dom --without-pear --with-pgsql --with-gd --with-zlib --enable-sockets --with-jpeg-dir=../jpeg-6b/&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-6207552280599134059?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/6207552280599134059/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=6207552280599134059&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6207552280599134059?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6207552280599134059?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/duBVBT9ocQA/creating-complete-lamp-solution-in.html" title="Creating a complete LAMP solution in Centos Linux" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/creating-complete-lamp-solution-in.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4MQnkyfyp7ImA9WxRbGEU.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-3163503537837733897</id><published>2008-06-17T13:47:00.003-03:00</published><updated>2008-12-10T02:56:23.797-02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-10T02:56:23.797-02:00</app:edited><title>Introduction to Iptables usage in Linux</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_1Xv_rWPOo3A/SFfx6-8FBNI/AAAAAAAAAQE/U8sMB5mAPUg/s1600-h/images.jpg"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_1Xv_rWPOo3A/SFfx6-8FBNI/AAAAAAAAAQE/U8sMB5mAPUg/s320/images.jpg" alt="" id="BLOGGER_PHOTO_ID_5212901089334330578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I am going to explain the generic matches, the ones that apply to all the IP packets.  In general, the patch pattern looks like "-s (--src, --source).&lt;br /&gt;&lt;address&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;iptables -A INPUT -s 10.10.10.5 -j DROP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The IP address could also be a hostname, in that case it would be resolved to an ip address before being added to the chain.  The field of the IP address could also be a range of addresses using a netmask.  This instruction is applied in the INPUT chain, but it could be used also in the OUTPUT chain if the machine has more than one ip address.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;iptables -A INPUT -s 10.10.10.0/24 -j DROP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This instructions matches the first 24 bits of the address.  This means, it matches addresses between 10.10.10.0 - 10.10.10.255.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;iptables -A INPUT -s ! 10.10.10.5 -j DROP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The exclamation mark negates the ipaddress, this matches the packets where the source IP is no 10.10.10.5&lt;br /&gt;&lt;br /&gt;The "-d (--dst --destination)" matches the destination address of the packets and is used generaly on the OUTPUT chain.  The same rules than in the -s option apply (address ranges can be specified as hostnames, a single IP address or a range, and negation of the addresses).  For example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;iptables -A OUTPUT -d ! 10.10.10.4 -j REJECT&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The "-i (--in-interface) &lt;interface&gt;" specify on which network interface the rule should take effect, for example "eth0".  This options could be used in the FORWARD, INPUT and PREROUTING chains.  The network interface also accepts wildcards, for example, if you want to filter all the traffic from a privat eaddress such as 10.10.10.2 in all the interfaces:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;iptables -A INPUT -s 10.10.10.2 -i eth* -j DROP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This would drop all packets arriving on eth0, eth1, eth2, etc.&lt;br /&gt;&lt;br /&gt;A final "-p" option allows to work with a specific protocol, for example, if you want to drop all the UDP packets:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;iptables -A INPUT -p udp -j DROP&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The protocols that can be used are:&lt;br /&gt;TCP, UDP, ICMP, ALL (this is for all the protocols).&lt;br /&gt;&lt;br /&gt;&lt;/interface&gt;&lt;/address&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-3163503537837733897?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/3163503537837733897/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=3163503537837733897&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/3163503537837733897?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/3163503537837733897?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/c0GXORezY8Y/introduction-to-iptables-usage-in-linux.html" title="Introduction to Iptables usage in Linux" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_1Xv_rWPOo3A/SFfx6-8FBNI/AAAAAAAAAQE/U8sMB5mAPUg/s72-c/images.jpg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/introduction-to-iptables-usage-in-linux.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0MGRnkyeyp7ImA9WxdQFkg.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-7015214532733703120</id><published>2008-06-16T18:11:00.002-03:00</published><updated>2008-06-16T18:23:47.793-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-16T18:23:47.793-03:00</app:edited><title>Analysing logs in Linux</title><content type="html">Part of the security and sysadmins tasks is the log analysis and decision taking.  There is plenty of information in &lt;a href="http://www.linux.org/apps/all/Administration/Log_Analyzers.html"&gt;http://www.linux.org/apps/all/Administration/Log_Analyzers.html&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The tools i recommend is called "Lire", this tool permits the creation of several reporting formats, including html, pdf, xml, &lt;a href="http://download.logreport.org/pub/current/doc/user-manual/ch01s04.html"&gt;between others&lt;/a&gt;.  It also permits to analyze many log file formats, which include MySQL, Iptables, BIND, Apache, Qmail, Postfix, Syslog &lt;a href="http://download.logreport.org/pub/current/doc/user-manual/ch01s03.html"&gt;and more&lt;/a&gt;.  Lire is GPL'ed Free Software (and Open Source), built around the idea of extendibility.&lt;br /&gt;&lt;br /&gt;This tool is available from http://www.logreport.org/lire, it has been deveploped in Perl and i recommend you to install all the dependence modules with CPAN (type "perl -M CPAN -e shell" on the command line as root).&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-7015214532733703120?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/7015214532733703120/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=7015214532733703120&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/7015214532733703120?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/7015214532733703120?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/qoavu7vavoQ/analysing-logs-in-linux.html" title="Analysing logs in Linux" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/analysing-logs-in-linux.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0QGRn89fyp7ImA9WxdQFUs.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-7239559183938094383</id><published>2008-06-15T19:30:00.001-03:00</published><updated>2008-06-15T19:35:27.167-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-15T19:35:27.167-03:00</app:edited><title>Logging on a remote server with syslog</title><content type="html">Hi, it is a good security feature to log in a remote host, because an attacker should have access to that host to delete the logs, and this adds another security layer to the architecture you build.&lt;br /&gt;&lt;br /&gt;Linux logging facilities are managed mostly by the syslog Daemon.  Syslog uses the configuration file &lt;span style="font-family:courier new;"&gt;/etc/syslog.conf&lt;/span&gt; to know where to log every system message.&lt;br /&gt;&lt;br /&gt;If you want to log in a remote host, you would add this line to &lt;span style="font-family: courier new;"&gt;syslog.conf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;        auth.*; authpriv.*         @192.168.100.7&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is required that the syslog daemon is started in the 192.168.100.7 host and it should also, be listening for messages thay come from the network.  It is important that you know that this feature is by default "off".  You have to start syslog with a "-r" argument to enable this.&lt;br /&gt;&lt;br /&gt;To force syslog to re-read syslog.conf, send a SIGHUP signal to syslog.&lt;br /&gt;&lt;br /&gt;Happy logging !&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-7239559183938094383?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/7239559183938094383/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=7239559183938094383&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/7239559183938094383?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/7239559183938094383?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/TU9Gu6onw3I/logging-on-remote-server-with-syslog.html" title="Logging on a remote server with syslog" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/logging-on-remote-server-with-syslog.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0UCRH86eSp7ImA9WxdQFEg.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-549861506274650758</id><published>2008-06-14T10:37:00.004-03:00</published><updated>2008-06-14T10:47:45.111-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-14T10:47:45.111-03:00</app:edited><title>Loading modules in RHEL 3.0 and prior Linux versions</title><content type="html">In RHEL 3.0 when you install a new module you may be tempted to put them in the file modules.conf.  This may not work, because the modules are not in the initrd boot image.&lt;br /&gt;&lt;br /&gt;The solution is to create a new file called /etc/rc.modules which loads the modules, this file do not exist by default, but if you see the file /etc/rc.d/rc.sysinit there you are going to see that it checks for the existence of the file, and if it exists, it executes it:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;# Load modules (for backward compatibility with VARs)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;if [ -f /etc/rc.modules ]; then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        /etc/rc.modules&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;fi&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This is the procedure to create the file:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;echo "modprobe qla2300" &gt;&gt; /etc/rc.modules&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;echo "modprobe qla2300_conf" &gt;&gt; /etc/rc.modules&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;chmod 700 /etc/rc.modules&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-549861506274650758?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/549861506274650758/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=549861506274650758&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/549861506274650758?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/549861506274650758?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/9xO62vmTIyY/loading-modules-in-rhel-30-and-prior.html" title="Loading modules in RHEL 3.0 and prior Linux versions" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/06/loading-modules-in-rhel-30-and-prior.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkcCRn84fCp7ImA9WxdQF0g.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-4601110369726224350</id><published>2008-03-31T17:38:00.004-03:00</published><updated>2008-06-17T21:47:47.134-03:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-06-17T21:47:47.134-03:00</app:edited><title>Infinite loops with shell scripting</title><content type="html">This way one can create useful infinite loops:&lt;br /&gt;&lt;br /&gt;while [ 1 ]; do echo "1"; done&lt;br /&gt;&lt;br /&gt;for ((;;)); do echo $RANDOM; sleep 1; done&lt;br /&gt;&lt;br /&gt;The $RANDOM variable has a random number.&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-4601110369726224350?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/4601110369726224350/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=4601110369726224350&amp;isPopup=true" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/4601110369726224350?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/4601110369726224350?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/Ne4P1D-BC04/infinite-loops-with-shell-scripting.html" title="Infinite loops with shell scripting" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">0</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/03/infinite-loops-with-shell-scripting.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk4MRX4-fSp7ImA9WxRbGEU.&quot;"><id>tag:blogger.com,1999:blog-18330441.post-6495042557955186240</id><published>2008-02-21T15:55:00.003-02:00</published><updated>2008-12-10T02:56:24.055-02:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2008-12-10T02:56:24.055-02:00</app:edited><title>How to use ssh through a proxy in Ubuntu</title><content type="html">&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_1Xv_rWPOo3A/R729DXwWxMI/AAAAAAAAAE8/gTCUOsDsE1Y/s1600-h/images.jpeg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_1Xv_rWPOo3A/R729DXwWxMI/AAAAAAAAAE8/gTCUOsDsE1Y/s320/images.jpeg" alt="" id="BLOGGER_PHOTO_ID_5169495812905288898" border="0" /&gt;&lt;/a&gt;This time i had to connect through an http proxy to other machines using ssh, this took me some investigation, mather that i like ;-)&lt;br /&gt;&lt;br /&gt;First i downloaded the connect-proxy package, the source code is also available but i had problems while compiling it, so i downloaded it from here:&lt;br /&gt;http://archive.ubuntu.com/ubuntu/pool/universe/c/connect-proxy/connect-proxy_1.95-3_i386.deb&lt;br /&gt;&lt;br /&gt;I had to download it withe Firefox, because i was behind a proxy and do not had still the possibility to download other ways.  wget probably accepts a proxy argument, but i used the fastest way.&lt;br /&gt;&lt;br /&gt;Then, i installed it:&lt;br /&gt;dpkg -i /home/walter/connect-proxy_1.95-3_i386.deb&lt;br /&gt;&lt;br /&gt;Then, create a file ~/.ssh/config, whit this:&lt;br /&gt;---&lt;br /&gt;Host *&lt;br /&gt;ProxyCommand connect-proxy -H proxy2.your.proxy.com:8080 %h %p&lt;br /&gt;---&lt;br /&gt;&lt;br /&gt;Finally, test the connection:&lt;br /&gt;ssh -F .ssh/config mysite.argentina.com.ar -p 2210&lt;br /&gt;&lt;br /&gt;And i did a tunnel to another application:&lt;br /&gt;ssh -F .ssh/config -g -L 8000:192.168.2.1:2211 mysite.argentina.com.ar -p 2210&lt;br /&gt;&lt;br /&gt;For more information about how to do a tunnel, see my previous post:&lt;br /&gt;&lt;a href="http://serverlinux.blogspot.com/2007/12/how-to-do-secure-tunel-with-ssh-in.html"&gt;Secure Tunnel&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;Linux system administration and security&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18330441-6495042557955186240?l=serverlinux.blogspot.com'/&gt;&lt;/div&gt;</content><link rel="replies" type="application/atom+xml" href="http://serverlinux.blogspot.com/feeds/6495042557955186240/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="https://www.blogger.com/comment.g?blogID=18330441&amp;postID=6495042557955186240&amp;isPopup=true" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6495042557955186240?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/18330441/posts/default/6495042557955186240?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/LinuxServer/~3/uACoIKiv_JA/how-to-use-ssh-through-proxy-in-ubuntu.html" title="How to use ssh through a proxy in Ubuntu" /><author><name>Walter Lamagna</name><uri>http://www.blogger.com/profile/13314444584359589028</uri><email>noreply@blogger.com</email><gd:extendedProperty name="OpenSocialUserId" value="01810635101191804625" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_1Xv_rWPOo3A/R729DXwWxMI/AAAAAAAAAE8/gTCUOsDsE1Y/s72-c/images.jpeg" height="72" width="72" /><thr:total xmlns:thr="http://purl.org/syndication/thread/1.0">1</thr:total><feedburner:origLink>http://serverlinux.blogspot.com/2008/02/how-to-use-ssh-through-proxy-in-ubuntu.html</feedburner:origLink></entry></feed>
