<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Open Source Software and Linux &#187; centos</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/linux-lotus-domino/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino</link>
	<description></description>
	<lastBuildDate>Thu, 02 May 2013 21:07:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Using SSL and a password to connect Sendmail to your ISP</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/using-ssl-and-a-password-to-connect-sendmail-to-your-isp/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/using-ssl-and-a-password-to-connect-sendmail-to-your-isp/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 19:01:16 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[isp]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[sasl]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[starttls]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/?p=180</guid>
		<description><![CDATA[Many ISPs are requiring SSL and a password to connect and send mail. This how to shows how to set up your sendmail server to use SSL with a password for connecting and sending mail through your ISP. I set this up on a CentOS 5.2 virtual machine. You should have the following packages installed: [...]]]></description>
				<content:encoded><![CDATA[<p>Many ISPs are requiring SSL and a password to connect and send mail.  This how to shows how to set up your sendmail server to use SSL with a password for connecting and sending mail through your ISP.</p>
<p>I set this up on a CentOS 5.2 virtual machine.  You should have the following packages installed:<br />
sendmail<br />
sendmail-cf<br />
cyrus-sasl<br />
cyrus-sasl-lib<br />
cyrus-sasl-plain<br />
openssl</p>
<p>First let&#8217;s generate our self signed certificate.  Be sure and use the FQDN of your server for the machine name.<br />
<code><br />
cd /etc/pki/tls/certs<br />
make sendmail.pem<br />
umask 77 ; \<br />
	PEM1=`/bin/mktemp /tmp/openssl.XXXXXX` ; \<br />
	PEM2=`/bin/mktemp /tmp/openssl.XXXXXX` ; \<br />
	/usr/bin/openssl req -utf8 -newkey rsa:1024 -keyout $PEM1 -nodes -x509 -days 365 -out $PEM2 -set_serial 0 ; \<br />
	cat $PEM1 &gt;  test.pem ; \<br />
	echo ""    &gt;&gt; test.pem ; \<br />
	cat $PEM2 &gt;&gt; test.pem ; \<br />
	rm -f $PEM1 $PEM2<br />
Generating a 1024 bit RSA private key<br />
........++++++<br />
..............................++++++<br />
writing new private key to '/tmp/openssl.wc3819'<br />
-----<br />
You are about to be asked to enter information that will be incorporated<br />
into your certificate request.<br />
What you are about to enter is what is called a Distinguished Name or a DN.<br />
There are quite a few fields but you can leave some blank<br />
For some fields there will be a default value,<br />
If you enter '.', the field will be left blank.<br />
-----<br />
Country Name (2 letter code) [GB]:US<br />
State or Province Name (full name) [Berkshire]:AZ<br />
Locality Name (eg, city) [Newbury]:Tempe<br />
Organization Name (eg, company) [My Company Ltd]:Self<br />
Organizational Unit Name (eg, section) []:<br />
Common Name (eg, your name or your server's hostname) []:mail.home.local<br />
Email Address []:myself@yahoo.com<br />
</code></p>
<p>Next we need to make some edits to the sendmail.mc file.  cd to /etc/mail and open the file with your favourite editor.  The following lines should be edited or added to match your configuration and/or connection information to your ISP.  Note that dnl at the front of a line indicates a comment.  This should be removed from the beginning of any lines that are edited.<br />
<code><br />
define(`SMART_HOST', `smtp.att.yahoo.com')dnl						&lt;==put your ISP's smtp server here</p>
<p>TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl				&lt;==uncomment the next two lines and add the third line<br />
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl<br />
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl</p>
<p>define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl					&lt;==uncomment these 4 lines<br />
define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl<br />
define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl<br />
define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl</p>
<p>DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl						&lt;==Remove the loopback address from this line</p>
<p>DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl					&lt;==uncomment this line<br />
</code></p>
<p>Now we need to set up the login information for your ISP&#8217;s smtp server.  In the /etc/mail directory perform the following:<br />
<code><br />
mkdir auth<br />
chmod 700 auth<br />
cd auth<br />
vi client-info<br />
</code><br />
Add the following line to the client-info file:<br />
<code><br />
AuthInfo:your.isp.net "U:root" "I:user" "P:password"<br />
</code><br />
Repace user with your ISP username and password with your smtp password.  Save and close the file and perform the following:<br />
<code><br />
makemap hash client-info &lt; client-info<br />
chmod 600 client-info*<br />
cd ..<br />
</code><br />
Now issue the following command so that everything is compile as sendmail likes it:<br />
<code><br />
make -C /etc/mail<br />
</code><br />
Last edit the following file and make sure that it contains the following two lines:<br />
<code><br />
vi /usr/lib/sasl2/Sendmail.conf<br />
pwcheck_method:saslauthd		&lt;==make sure that these two lines are in the file<br />
mech_list: plain login<br />
</code></p>
<p>If you are using tcpwrappers as I have suggested in the past add the following line to hosts.allow.  Change the ip configuration to match your setup:<br />
<code><br />
vi /etc/hosts.allow<br />
sendmail:	172.16.<br />
</code><br />
Now it&#8217;s time to test.  Make sure that the correct services are running:<br />
<code><br />
/etc/init.d/sendmail start<br />
/etc/init.d/saslauthd start<br />
</code></p>
<p>After starting check the log at /var/log/maillog.  If you find any errors that contain `starttls&#8217; then either something is wrong with the sendmail.pem file that you created or the saslauth daemon is not started.  I had a situation once where something happened to the sendmail.pem file and recreating it solved the problem.  Beyond that check your firewall, syntax in the sendmail.mc and hosts.allow and hosts.deny files.</p>
<p>Once everything is started cleanly open up your mail client.  I used evolution for testing.  Edit the preferences and use the settings for your sendmail server.  For mine I used the IP address of the sendmail server, check &#8220;Server requires authentication&#8221;, set &#8220;Use secure connection&#8221; to SSL encryption and entered the user name that I use to login to the sendmail server.  Note that this is not your ISP username.</p>
<p>Now you should be able to send a test message out through the internet and receive it back through your ISP&#8217;s pop server.</p>
<p>Enjoy!</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/using-ssl-and-a-password-to-connect-sendmail-to-your-isp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux security basics aka don&#8217;t do this!</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/linux-security-basics-aka-dont-do-this/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/linux-security-basics-aka-dont-do-this/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 22:40:10 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sysctl]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/?p=175</guid>
		<description><![CDATA[I mention Linux security in the title but these best practices apply to any operating system. There are many excellent 3rd party security tools out there for you to install on your system. Prior to installing these though you should review the tools that are already on your system. There is probably already a package [...]]]></description>
				<content:encoded><![CDATA[<p>I mention Linux security in the title but these best practices apply to any operating system.</p>
<p>There are many excellent 3rd party security tools out there for you to install on your system.  Prior to installing these though you should review the tools that are already on your system.  There is probably already a package included with the system that will accomplish what you need.</p>
<p>Why not use these tools?  The major Linux distributions have gone to considerable expense to test these tools and make sure that they will not break anything on your system.  When you consider the many 3rd party applications that are certified for a distribution such as Lotus Domino and JBoss this becomes even more critical.  These applications are generally installed because they are mission critical.   You don&#8217;t want to install a non certified security application only to find that it breaks or creates a security flaw in your certified mission critical application.  Don&#8217;t do this.</p>
<p>A pet peeve of mine has always been the idea of &#8220;point and click and know not what I just did&#8221; that many administrators perform.  While this seems to be more prevalent in the Windows world it exists in the *nix world as well.  Generally the idea of text configuration files can overcome this but not always.  Take, for example, the <a href="http://securecentos.com/">website securecentos.com</a> (not affiliated with CentOS).  One of the things that they want you to do is patch your kernel with a patch from <a href="http://www.grsecurity.com/">http://www.grsecurity.com/</a>.  Doing something like this should raise a red flag immediately.  Do you know what the patch is fixing and/or how it is making your machine more secure?  If you can&#8217;t answer yes to this then don&#8217;t do it with this or any other patch except one from your vendor.  </p>
<p>Aside from that when your vendor releases a kernel update you are going to have to go and redo the whole process again.  This can quite quickly become heavy with administrative costs.  If your machines are duplicated across the network now you have to go and install this on all of them.  And again when you run a kernel update.  Don&#8217;t do this.</p>
<p>You should never download a configuration file that affects the core of your machine without knowing exactly what it does.  Using the same site above they have many configuration files that they want you to download and put into production on your machine(s).  There is even a sysctl.conf file which affects many core processes of your machine and how they operate.  At the time of this post comments in this file are non existent.  This amounts to the notion of &#8220;point and click and know not what I just did&#8221; mentioned above.  Don&#8217;t do this.</p>
<p>I don&#8217;t mean to single out securecentos.com.  It just happens to be the one that I ran across today among the many out there asking administrators to do some things that they should think twice about..  I&#8217;m sure that they mean well.  If I got out my sysctl manual I could find out what each of those changes would to do to my machine.  However I&#8217;m not going to..if they want me to use their product/advice then those should be clearly documented either in the file or with a url embedded in the file that leads to that information.</p>
<p>Be smart with your machines!  Don&#8217;t go putting configuration files in service, clicking on buttons that affect the security or core services of your machine or installing 3rd party applications that may already have the equivalent tested on your machine without knowing exactly what other files and applications they are going to affect.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/linux-security-basics-aka-dont-do-this/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS prepares to release 5.3</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/centos-prepares-to-release-53/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/centos-prepares-to-release-53/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 21:27:45 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[5.3]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[encrypting]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[virtualizaton]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/?p=173</guid>
		<description><![CDATA[Following their mandate to be binary compatible with Red Hat, CentOS is preparing to release version 5.3. Red Hat released version 5.3 on January 21st of this year. The CentOS developers generally follow with a CentOS release about 3-5 weeks after Red Hat. This should put the release as generally available around March 1st. We [...]]]></description>
				<content:encoded><![CDATA[<p>Following their mandate to be binary compatible with Red Hat, CentOS is preparing to release version 5.3.</p>
<p>Red Hat released version 5.3 on January 21st of this year.   The CentOS developers generally follow with a CentOS release about 3-5 weeks after Red Hat.  This should put the release as generally available around March 1st.</p>
<p>We can expect to see some very nice feature enhancements on this release.  NetWorkManager and wpa_supplicant have a whole host of updates listed.  This means improved wireless security and better driver support.  For those of us using Broadcom wireless drivers the b43 driver from <a href="http://linuxwireless.org/en/users/Drivers/b43">linuxwireless.org</a> has been backported.  Following the links on that page should lead you to the proper firmware as well.</p>
<p>The new ext4 filesystem is also incuded in the new release.  Laptop users like myself will be glad to know that anaconda now supports encrypted block devices during installation.  Red Hat continues their commitment to Xen and has released many updates for virtualizaton including support for up to 126 CPUs in the x86_64 Xen-based hypervisor (up to 32 CPUs per virtual server) and support for up to 1TB memory per host on x86_64 (up to 80GB per virtual server).</p>
<p>Other enhancements include 802.1q VLAN tagging support for kickstart, iSCSI installation and boot support, ability to install Xen and KVM guests and for fibre channel users Emulex FCoE HBA support through the lpfc driver and QLogic FCoE HBA support through qla2xxx driver.  See a full list of new features <a href="https://www.redhat.com/archives/rhelv5-announce/2009-January/msg00000.html">here</a>.</p>
<p>With all of these new enhancements desktop users and server administrators are sure to be pleased.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/centos-prepares-to-release-53/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Openfiler NAS as a Xen virtual host</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/installing-openfiler-nas-as-a-xen-virtual-host/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/installing-openfiler-nas-as-a-xen-virtual-host/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 20:33:05 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[NAS]]></category>
		<category><![CDATA[openfiler]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[rpath]]></category>
		<category><![CDATA[virtual machine]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/?p=108</guid>
		<description><![CDATA[If you&#8217;ve ever tried to install the Openfiler NAS frontend as a Xen virtual host you probably found that 1) it was not as straightforward as it would seem, 2)getting the right combination of information that is on the web correct in the openfiler config file is difficult and 3)documentation at the Openfiler web site [...]]]></description>
				<content:encoded><![CDATA[<p>If you&#8217;ve ever tried to install the Openfiler NAS frontend as a Xen virtual host you probably found that 1) it was not as straightforward as it would seem, 2)getting the right combination of information that is on the web correct in the openfiler config file is difficult and 3)documentation at the Openfiler web site is nonexistent for this setup. </p>
<p>The OS that I use is Centos 5.2 with the native Red Hat Xen virtualization utilities.  This should also be good for RHEL 5.2 as well.  I downloaded and installed openfiler-2.3-x86.tar.gz as the NAS frontend for my Xen virtual server.  The information that I provide here is good for that version.  I have a feeling that it may change some from version to version as many of the config files that I found were very similar but enough off to keep the machine from booting.</p>
<p>I use physical volumes for all of my Xen virtual machines.  All of this should apply except for the way that file images are defined in the config file.</p>
<p>You will need approximately 3 GB of disk space for the Openfiler front end and swap.  You probably should add a little more in case you find that you want some applications installed that don&#8217;t come with Openfiler.  By default Openfiler will use about 1 GB of that space for swap.<br />
<code><br />
[root@openfiler ~]# df -h<br />
Filesystem            Size  Used Avail Use% Mounted on<br />
/dev/xvda1            6.0G  2.3G  3.4G  40% /<br />
none                  130M     0  130M   0% /dev/shm<br />
</code><br />
<code><br />
[root@openfiler ~]# free<br />
             total       used       free     shared    buffers     cached<br />
Mem:        264596     218432      46164          0      84448      55240<br />
-/+ buffers/cache:      78744     185852<br />
Swap:      1048568          0    1048568<br />
</code></p>
<p>After deciding how much disk space that you want to use create it using your desired method-physical disk or file image.  Once you have it created format it with ext3 or with your favorite file system.  Now mount it and extract the tar ball from where you saved it into mounted directory. I created the directory openfiler under /mnt and mounted the disk there.<br />
<code><br />
lvcreate -L+6G -n openfiler linux-virtuals.hdd1<br />
mkfs -j -L openfiler /dev/linux-virtuals.hdd1/openfiler<br />
mkdir /mnt/openfiler<br />
mount /dev/linux-virtuals.hdd1/openfiler /mnt/openfiler<br />
cd /mnt/openfiler<br />
tar xzvf /srv/secure/openfiler-2.3-x86.tar.gz #path to saved tarball<br />
</code></p>
<p>You need to create a directory to hold the boot files on your Xen host machine.  I called mine boot-openfiler.  Copy all of the files from /mnt/openfiler/boot/* to /boot-openfiler.  Next copy the openfiler kernel modules to /lib/modules.<br />
<code><br />
mkdir /boot-openfiler<br />
cp -a /mnt/openfiler/boot/* /boot-openfiler/<br />
cp -a /mnt/openfiler/lib/modules/2.6.21.7-3.20.smp.pae.gcc3.4.x86.i686.xen.domU /lib/modules/<br />
</code></p>
<p>Now we need to create our openfiler NAS config file.  cd to /etc/xen and create the config file for openfiler.  You can use the one shown below as a template.  Be sure that you create a unique uuid, MAC address and adjust your disk paths.<br />
<code><br />
cd /etc/xen<br />
vim openfiler</p>
<blockquote><p>Start config file</p></blockquote>
<p>name = "openfiler"<br />
uuid = "203e2874-b08c-4066-7166-cada1b5b7341"<br />
maxmem = 256<br />
memory = 256<br />
vcpus = 1<br />
kernel="/boot-openfiler/vmlinuz-2.6.21.7-3.20.smp.pae.gcc3.4.x86.i686.xen.domU"<br />
ramdisk="/boot-openfiler/initrd-2.6.21.7-3.20.smp.pae.gcc3.4.x86.i686.xen.domU.img"<br />
root="/dev/xvda1 ro"<br />
#bootloader = "/usr/bin/pygrub"<br />
on_poweroff = "destroy"<br />
on_reboot = "restart"<br />
on_crash = "restart"<br />
vfb = [ "type=vnc,vncunused=1,keymap=en-us" ]<br />
disk = [ "phy:/dev/linux-virtuals.hdd1/openfiler,xvda1,w", "phy:/dev/sda,xvdb,w" ]<br />
vif = [ "mac=00:16:3e:38:75:88,bridge=xenbr0" ]</p>
<blockquote><p>End config file</p></blockquote>
<p></code><br />
Notice that the kernel= and and ramdisk= point to the /mnt/openfiler/boot/* files that we copied point to the boot-openfiler directory that we created.  You will also need to add your root=xvda1 ro to the config file.  The &#8220;phy:/dev/sda,xvdb,w&#8221; entry that you see above is the 1TB SimpleTech external drive for which I am using the Openfiler NAS frontend.</p>
<p>Now unmount the partition that you mounted for the Openfiler files and start the domain with the typical xm create -c openfiler or the virsh command.</p>
<p>A cautionary note:  Don&#8217;t copy the config file from above.  WordPress seems to do something to the lines and they don&#8217;t start and end correctly ie. they won&#8217;t be parsed correctly when starting the domain.</p>
<p>Have fun with your new Openfile NAS!</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/installing-openfiler-nas-as-a-xen-virtual-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding the iptables firewall to the Xen domU (part 2)</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/adding-the-iptables-firewall-to-the-xen-domu-part-2/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/adding-the-iptables-firewall-to-the-xen-domu-part-2/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 22:59:29 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[domU]]></category>
		<category><![CDATA[Firewalls]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[pciback]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/adding-the-iptables-firewall-to-the-xen-domu-part-2/</guid>
		<description><![CDATA[In my last column we set up a physical NIC in our Xen domU to expose it to the internet and setup our iptables firewall. At this point you should have 2 interfaces in your domU. One should be facing the internet and have an IP Address assigned from your ISP. The other should be [...]]]></description>
				<content:encoded><![CDATA[<p>In my last column we set up a physical NIC in our Xen domU to expose it to the internet and setup our iptables firewall.</p>
<p>At this point you should have 2 interfaces in your domU.  One should be facing the internet and have an IP Address assigned from your ISP. The other should be a typical Xen interface with a static IP that connects to the rest of your network.</p>
<p>To start off our iptables network let&#8217;s open up the system-config-security application and make sure that iptables is enabled.   Go ahead and close this once that is done.  That should create a standard Red Hat\CentOS firewall setup as a starting point.  You can check this by issuing the command:<br />
<code><br />
iptables -L<br />
</code></p>
<p>Notice the chain that Red Hat\Centos adds to the typical iptables -L output.  It is referenced by the input and forward chains.  Generally when you put in a reference to the input chain you need a corresponding reference to the forward chain.  This extra chain is the one that we will work with the most.  Since it is referenced by both the forward and input chains we don&#8217;t need to put corresponding rules in both chains  It is called:<br />
<code><br />
RH-Firewall-1-INPUT<br />
</code></p>
<p>The first thing that we want to do is get the machines on our network out to the internet.  We do this by using the nat table and the postrouting chain. This is the command to accomplish that:<br />
<code><br />
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE<br />
</code><br />
This will let any internet request from your internal network access the internet.  My internet facing NIC is eth1. Your&#8217;s may vary.  Notice the -o eth1.  This indicates that it is looking for outbound packets on eth1.</p>
<p>By default anything coming in from the internet is blocked. You&#8217;re probably going to want to let ssh and maybe openvpn come in from the internet.  The solution that I use for this is to use domUs behind the firewall so that these requests land there rather than on the firewall machine.  Here is how to setup an inbound request and have it directed to the landing server.  From there you can go where you need on the network.<br />
<code><br />
##ssh<br />
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 22 -j DNAT --to 172.16.0.201<br />
##openvpn<br />
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 1194 -j DNAT --to 172.16.0.201<br />
</code><br />
Any port that you need uses the exact same syntax except for the port number.</p>
<p>We also need to enable port forwarding so that it will survive a reboot.  Use the following commands to enable it for your current session and set it up to survive a reboot:<br />
<code><br />
[root@virtual-host ~]# sysctl -w net.ipv4.ip_forward=1<br />
[root@virtual-host ~]# sysctl -p<br />
#output<br />
net.ipv4.ip_forward = 1<br />
net.ipv4.conf.default.rp_filter = 1<br />
net.ipv4.conf.default.accept_source_route = 0<br />
kernel.sysrq = 0<br />
kernel.core_uses_pid = 1<br />
net.ipv4.tcp_syncookies = 1<br />
kernel.msgmnb = 65536<br />
kernel.msgmax = 65536<br />
kernel.shmmax = 4294967295<br />
kernel.shmall = 268435456<br />
[root@virtual-host ~]#<br />
</code><br />
As we can see from the first line under #output ip forwarding is set to 1 which means that it is turned on.</p>
<p>Note that if you go back and use any of the firewall GUIs provided you will lose all of the settings that used the nat table.  I suggest that you stick with the command line after making your initial setup.</p>
<p>Here is what my iptables output looks like:<br />
</code><br />
[root@fw0 ~]# iptables -L<br />
Chain INPUT (policy ACCEPT)<br />
target     prot opt source               destination<br />
RH-Firewall-1-INPUT  all  --  anywhere             anywhere            </p>
<p>Chain FORWARD (policy ACCEPT)<br />
target     prot opt source               destination<br />
RH-Firewall-1-INPUT  all  --  anywhere             anywhere<br />
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:servicetag<br />
ACCEPT     udp  --  anywhere             anywhere            udp dpt:servicetag </p>
<p>Chain OUTPUT (policy ACCEPT)<br />
target     prot opt source               destination         </p>
<p>Chain RH-Firewall-1-INPUT (2 references)<br />
target     prot opt source               destination<br />
DROP       tcp  --  yktgi01e0-s4.watson.ibm.com  anywhere            tcp dpt:https<br />
DROP       tcp  --  yktgi01e0-s4.watson.ibm.com  anywhere            tcp dpt:http<br />
ACCEPT     all  --  anywhere             anywhere<br />
ACCEPT     all  --  anywhere             anywhere<br />
ACCEPT     icmp --  anywhere             anywhere            icmp any<br />
ACCEPT     esp  --  anywhere             anywhere<br />
ACCEPT     ah   --  anywhere             anywhere<br />
ACCEPT     udp  --  anywhere             224.0.0.251         udp dpt:mdns<br />
ACCEPT     udp  --  anywhere             anywhere            udp dpt:ipp<br />
ACCEPT     udp  --  anywhere             anywhere            state NEW,RELATED,ESTABLISHED udp dpt:servicetag<br />
ACCEPT     tcp  --  anywhere             anywhere            state NEW,RELATED,ESTABLISHED tcp dpt:servicetag<br />
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ipp<br />
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED<br />
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:domain<br />
ACCEPT     udp  --  anywhere             anywhere            state NEW udp dpt:domain<br />
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:ssh<br />
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:smtp<br />
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:http<br />
ACCEPT     tcp  --  anywhere             anywhere            state NEW tcp dpt:https<br />
REJECT     all  --  anywhere             anywhere            reject-with icmp-host-prohibited<br />
[root@fw0 ~]#</p>
<p>The two drops that you see at the top of the input chain are from somebody that kept hitting on my web server.  Usually if you want to put a drop in against a specific target your will want to insert (I) it at the top of the chain like so:<br />
<code><br />
iptables -I RH-Firewall-1-INPUT 1 -p tcp  --dport 80  --source 11.22.33.444 -j DROP<br />
</code><br />
The 1 just after INPUT instructs iptables to make that the first rule in the chain.  Since both the input and forward chains are reference by the RH-Firewall-1-INPUT chain we don't have to concern ourselves with putting the same rule in the forward chain.</p>
<p>I hope this helps you get started with your domU firewall.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/adding-the-iptables-firewall-to-the-xen-domu-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up a physical NIC for a firewall on a Xen domU (Part 1)</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/setting-up-an-iptables-firewall-on-a-xen-domu/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/setting-up-an-iptables-firewall-on-a-xen-domu/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 19:56:12 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[domU]]></category>
		<category><![CDATA[domU firewall]]></category>
		<category><![CDATA[pciback]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xen firewall]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/setting-up-an-iptables-firewall-on-a-xen-domu/</guid>
		<description><![CDATA[Recently I brought up a new Xen server that needed an iptables firewall on a domU. My first thought had been to setup the firewall on dom0 but that turned out to be a difficult task because of all of the virtual interfaces that are created. Red Hat/Centos also installs a set of rules by [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I brought up a new Xen server that needed an iptables firewall on a domU.  My first thought had been to setup the firewall on dom0 but that turned out to be a difficult task because of all of the virtual interfaces that are created.  Red Hat/Centos also installs a set of rules by default to make sure that all of these interfaces will interact with each other properly.  Onward to domU.</p>
<p>The first thing necessary to setting up a domU firewall that is exposed to the internet is to &#8220;hide&#8221; an interface from dom0 and import it into the domU firewall machine.  To start we need to do a few things.  Ultimately this is going to cause of reboot of dom0 so consider if this is feasible for your situation.</p>
<p>Let&#8217;s get started.  First we need to get some numbers from the interface  To do this use the lspci command.<br />
<code><br />
[root@virtual-host ~]# lspci |grep -i ethernet<br />
==&gt;01:02.0 Ethernet controller: Intel Corporation 82546GB Gigabit Ethernet Controller (rev 03)<br />
01:02.1 Ethernet controller: Intel Corporation 82546GB Gigabit Ethernet Controller (rev 03)<br />
01:06.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 02)<br />
</code><br />
As you can see I have three interfaces on this machine.  The marked interface requires an entry into modprobe.conf and the xen firewall configuration file.<br />
<code><br />
##modprobe.conf<br />
options pciback hide=(01:02.0)</p>
<p>##xen firewall configuration<br />
pci = [ "01:02.0" ]<br />
</code></p>
<p>Now we need to use the lspci -n command and use this entry in the xend-pci-permissive.sxp file under /etc/xen.<br />
<code><br />
[root@virtual-host xen]# lspci -n<br />
==&gt;01:02.0 0200: 8086:1079 (rev 03)<br />
01:02.1 0200: 8086:1079 (rev 03)<br />
1:06.0 0200: 8086:100e (rev 02)<br />
</code><br />
Match the pci numbers from the lspci command to find the correct line.  You&#8217;ll want the last 8 characters of this line.  In the code above we want the 8086:1079 part of the output.</p>
<p>Open the xend-pci-permissive.sxp  and make an entry like the following:<br />
<code><br />
(unconstrained_dev_ids<br />
('8086:1079')<br />
)<br />
</code></p>
<p>Once we have this done we need to make a new initrd image that preloads the pciback module.  Before running the following code you should make a copy of your current initrd.  If you run into problems you can use this to replace the one that you created and try again.  Use the following code to create the new initrd:<br />
<code><br />
cd /boot<br />
mkinitrd -f --preload pciback initrd-$(uname -r).img $(uname -r)<br />
</code></p>
<p>After creating the new initrd it&#8217;s time to reboot and check your work.</p>
<p>Once dom0 is up we need to look for certain entries in /var/log/messages:<br />
<code><br />
[root@virtual-host ~]# grep pciback /var/log/messages<br />
vpci: 0000:01:02.0: assign to virtual slot 0<br />
virtual-host kernel: pciback 0000:01:02.0: seizing device<br />
virtual-host kernel: pciback 0000:01:02.0: enabling permissive mode configuration space accesses!<br />
virtual-host kernel: pciback 0000:01:02.0: permissive mode is potentially unsafe!<br />
virtual-host kernel: pciback: vpci: 0000:01:02.0: assign to virtual slot 0<br />
</code></p>
<p>Once you see that the device is seized and assigned to a virtual slot check your firewall machine to make sure it is getting an ip from your ISP as well as connected to your local lan IP.<br />
<code><br />
[root@fw0 ~]# ifconfig<br />
eth0      Link encap:Ethernet  HWaddr 00:16:3E:36:73:82<br />
          inet addr:172.16.0.254  Bcast:172.16.255.255  Mask:255.255.0.0<br />
          inet6 addr: fe80::216:3eff:fe36:7382/64 Scope:Link<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          RX packets:548690 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:291190 errors:0 dropped:0 overruns:0 carrier:0<br />
          collisions:0 txqueuelen:1000<br />
          RX bytes:486044371 (463.5 MiB)  TX bytes:47023339 (44.8 MiB)</p>
<p>eth1      Link encap:Ethernet  HWaddr 00:04:23:A6:C1:0E<br />
          inet addr:76.240.xxx.xxx  Bcast:76.240.xxx.xxx  Mask:255.255.255.0<br />
          inet6 addr: fe80::204:23ff:fea6:c10e/64 Scope:Link<br />
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br />
          RX packets:311217 errors:0 dropped:0 overruns:0 frame:0<br />
          TX packets:564587 errors:0 dropped:0 overruns:0 carrier:0</p>
<p>          collisions:0 txqueuelen:100<br />
          RX bytes:50257788 (47.9 MiB)  TX bytes:487593757 (465.0 MiB)<br />
          Base address:0xb400 Memory:fea40000-fea60000<br />
</code></p>
<p>As you can see from the above output eth0 is connected to my lan and eth1 has received it&#8217;s internet address so that we are connected to the internet.  The OS (Red Hat/CentOS) should create the entry for eth1 without any input on your part.</p>
<p>Please read my next post for setting up iptables in your domU.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/setting-up-an-iptables-firewall-on-a-xen-domu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SELinux on Ubuntu</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-on-ubuntu/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-on-ubuntu/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 00:47:39 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[linux security]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-on-ubuntu/</guid>
		<description><![CDATA[The other day after installing Ubuntu on one of my test machines I noticed that there was an ls -Z command which shows various selinux information about files and directories. Running this command however gave some strange output, primarily ? marks. I thought this was a little strange but had other things that I needed [...]]]></description>
				<content:encoded><![CDATA[<p>The other day after installing Ubuntu on one of my test machines I noticed that there was an ls -Z command which shows various selinux information about files and directories.</p>
<p>Running this command however gave some strange output, primarily ? marks.  I thought this was a little strange but had other things that I needed to do at the time and decided that I would look into it later.</p>
<p>This weekend was that time.  Let me say that I use SELinux on my Red Hat and CentOS machines and think that it is a very good way to help secure a machine.  However it is anything but intuitive.  If it weren&#8217;t for some very good documentation at Red Hat I probably never would have been successful at using this security tool.  Mind you I&#8217;m no guru with it but I have six servers using it and I know how to troubleshoot SeLinux problems.</p>
<p>Which brings me to the part about Ubuntu and SELinux that I find disturbing.  Doing some Google searching I ran across two pages regarding Ubuntu and SELinux.  Both of them had no usable information in them other than how to install SELinux.  Nothing about what to expect, how to troubleshoot, what a context or a boolean is nor did it mention if Ubuntu provided any troubleshoooting tools like setroubleshoot.  You can find these two pages <a href="http://ubuntu-tutorials.com/2008/03/18/how-to-install-selinux-on-ubuntu-804-hardy-heron/">here</a> and <a href="https://help.ubuntu.com/community/SELinux">here</a>.</p>
<p>The documentation only warned that SELinux is for experienced users.  While that is an understatement how do they expect people to start using it to protect their machines?  It would seem to indicate that they have no real interest in their users having the ability to use SELinux.  I personally think that is a shame.  I also believe that it is going to hurt their efforts at becoming enterprise ready especially with their server product.  I certainly won&#8217;t be installing Ubuntu on any of my critical machines.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SELinux and what I&#8217;ve learned in the last two days..</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-and-what-ive-learned-in-the-last-two-days/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-and-what-ive-learned-in-the-last-two-days/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 20:28:29 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[getsebool]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[selinux apache]]></category>
		<category><![CDATA[selinux httpd]]></category>
		<category><![CDATA[selinux mysql]]></category>
		<category><![CDATA[selinux nfs]]></category>
		<category><![CDATA[setsebool]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-and-what-ive-learned-in-the-last-two-days/</guid>
		<description><![CDATA[I am bringing up a new Virtual Host with VMs of MySQL, music-repo and a webserver. All of these are on CentOS with SELinux enabled. No, I&#8217;m not a glutton for punishments using SELinux for all of these machines that are interconnected to each other. I believe the time is coming when organizations are going [...]]]></description>
				<content:encoded><![CDATA[<p>I am bringing up a new Virtual Host with VMs of MySQL, music-repo and a webserver.  All of these are on CentOS with SELinux enabled.  No, I&#8217;m not a glutton for punishments using SELinux for all of these machines that are interconnected to each other.  I believe the time is coming when organizations are going to insist on the type of security that SELinux provides.</p>
<p>Moving on I mentioned that my MySQL server is on one box and my web server on another.  One of the applications that I use is <a href="http://www.kplaylist.net/">KPlaylist</a>.  This is a streaming server for mp3s, movies or just about anything you want to stream.  My first snag was getting it to log into MySQL and create the database.</p>
<p>After about an hour of looking for normal causes I decided to turn on setroubleshoot.  This is a great tool when looking for SELinux problems.  After I turned it on I found this in /var/log/messages:</p>
<blockquote><p>Nov 20 15:40:47 web setroubleshoot: SELinux is preventing the http daemon from connecting to network port 3306 For complete SELinux messages. run sealert -l 65919ff0-ddd1-4a4b-801d-f54023da86ac</p></blockquote>
<p>So then I ran the sealert command shown in the message:<br />
<code><br />
sealert -l 65919ff0-ddd1-4a4b-801d-f54023da86ac<br />
</code><br />
This gave me the following along with some other information:<br />
<code><br />
setsebool -P httpd_can_network_connect=1<br />
</code></p>
<p>Voila! My problem was fixed.  Well almost.  I then discovered that iptables was  blocking the port.  After opening the port using the gui &#8220;system-config-securitylevel&#8221; all was well.  KPLaylist installed it&#8217;s database just like it was supposed to.</p>
<p>My next hurdle was getting the nfs share on the music-repo server to mount on to the web server.  Checking for another sealert I found one on the webserver called </p>
<blockquote><p>Nov 20 23:57:33 web setroubleshoot: SELinux prevented the http daemon from reading files stored on a NFS filesytem. For complete SELinux messages. run sealert -l f76bd0be-d375-436f-9c09-2086da0d7a39</p></blockquote>
<p>After running this I got the following information:<br />
<code><br />
setsebool -P httpd_use_nfs=1<br />
</code></p>
<p>Well this didn&#8217;t totally solve my problem but I did notice that things were getting fixed with the setsebool command.  I went looking around the net to see what I could learn about it.</p>
<p>What I learned is that if you are having a problem with a service is that you should run the command getsebool -a |grep someservice.  I decided to try that with NFS and this is what I got:<br />
<code><br />
[root@music-repo ~]# getsebool -a |grep nfs<br />
allow_ftpd_use_nfs --&gt; off<br />
allow_nfsd_anon_write --&gt; off<br />
nfs_export_all_ro --&gt; on<br />
nfs_export_all_rw --&gt; on<br />
nfsd_disable_trans --&gt; off<br />
samba_share_nfs --&gt; off<br />
use_nfs_home_dirs --&gt; off<br />
[root@music-repo ~]#<br />
</code><br />
The last line was what I found interesting.  I had originally had my music directory on the music-repo machine at the root of the system.  My thought was OK let&#8217;s create a user with a home directory and enable that boolean.  I created a user on the musiic-repo system called apache and moved the /music directory into /home/apache.  I then ran the command:<br />
<code><br />
setsebool -P use_nfs_home_dirs=on<br />
</code></p>
<p>I also moved my music directory that I was mounting to under /var/www which is apache&#8217;s home and ran the same command.  Now everything was connected and working like it is supposed to be.</p>
<p>A note of interest to those of you who would prefer a gui..you should install policycoreutils-gui.  This will give you a nice gui called system-config-selinux.  In this gui you can browse through everthing SELinux has to say and can change.  </p>
<p>Now to get that setup as a share for the Windows users so that they can store their music and get it backed up.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/selinux-and-what-ive-learned-in-the-last-two-days/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maintaining your sanity with SELinux</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/maintaining-your-sanity-with-selinux/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/maintaining-your-sanity-with-selinux/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 14:56:56 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[chcon]]></category>
		<category><![CDATA[linux security]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[restorecon]]></category>
		<category><![CDATA[sealert]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[selinux]]></category>
		<category><![CDATA[setroubleshoot]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/maintaining-your-sanity-with-selinux/</guid>
		<description><![CDATA[Yes I know..everyone wants to turn off selinux. The Notes Domino people even tell you to turn off selinux before installing Domino. While this is probably a good idea for them in normal server cases it is maybe not such a good idea under normal circumstances. SeLinux is another excellent layer to protecting your system [...]]]></description>
				<content:encoded><![CDATA[<p>Yes I know..everyone wants to turn off selinux.  The Notes Domino people even tell you to turn off selinux before installing Domino.  While this is probably a good idea for them in normal server cases it is maybe not such a good idea under normal circumstances.  SeLinux is another excellent layer to protecting your system along with iptables and hosts.all and hosts.deny.  Keeping a few things in mind will help you maintain your sanity while using selinux.</p>
<p>First up are the /var/log/audit/audit.log, /var/log/security and /var/log/messages.  If selinux is set to enforcing and you&#8217;ve just installed a new application or created a file or directory that is not allowing proper access these three files are the place to go.  Before you do this make sure the following applications are installed:<br />
setroubleshoot.noarch<br />
setroubleshoot-plugins.noarch<br />
setroubleshoot-server.noarch </p>
<p>After installing these make sure that you start the setroubleshoot application and set it to start on reboot:<br />
<code><br />
/etc/init.d/setroubleshoot start<br />
Starting setroubleshootd:                                  [  OK  ]<br />
chkconfig setroubleshoot on<br />
</code></p>
<p>Watch the logs in real time as you attempt to access the application, file or directory like this:<br />
<code><br />
cd /var/logs<br />
tail -f security audit/audit.log messages<br />
</code><br />
After doing this hit enter three times to give you some white space between the old messages and the new ones that are generated.  If selinux is giving you a problem you will see something like the following in the messages log:<br />
<code><br />
Nov  5 08:18:44 centos5-dev setroubleshoot: SELinux is preventing access to files with the label, file_t. For complete SELinux messages. run sealert -l d102b5a4-ac6f-470f-aa34-55ac37dafa37<br />
</code></p>
<p>To find out not only what is going on but how to fix it run the sealert -l d102b5a4-ac6f-470f-aa34-55ac37dafa37 command described in the message.<br />
<code><br />
[root@centos5-dev ~]# sealert -l d102b5a4-ac6f-470f-aa34-55ac37dafa37</p>
<p>Summary:</p>
<p>SELinux is preventing access to files with the label, file_t.</p>
<p>Detailed Description:</p>
<p>SELinux permission checks on files labeled file_t are being denied. file_t is<br />
the context the SELinux kernel gives to files that do not have a label. This<br />
indicates a serious labeling problem. No files on an SELinux box should ever be<br />
labeled file_t. If you have just added a new disk drive to the system you can<br />
relabel it using the restorecon command. Otherwise you should relabel the entire<br />
files system.</p>
<p>Allowing Access:</p>
<p>You can execute the following command as root to relabel your computer system:<br />
"touch /.autorelabel; reboot"</p>
<p>Additional Information:</p>
<p>Source Context                system_u:system_r:hplip_t<br />
Target Context                system_u:object_r:file_t<br />
Target Objects                libc.so.6 [ lnk_file ]<br />
Source                        hpssd.py<br />
Source Path                   /bin/env<br />
Port<br />
Host                          centos5-dev.hendricks.org<br />
Source RPM Packages           coreutils-5.97-14.el5<br />
Target RPM Packages<br />
Policy RPM                    selinux-policy-2.4.6-137.1.el5<br />
Selinux Enabled               True<br />
Policy Type                   targeted<br />
MLS Enabled                   True<br />
Enforcing Mode                Enforcing<br />
Plugin Name                   file<br />
Host Name                     centos5-dev.hendricks.org<br />
Platform                      Linux centos5-dev.hendricks.org<br />
                              2.6.18-92.1.10.el5xen #1 SMP Tue Aug 5 08:46:32<br />
                              EDT 2008 i686 athlon<br />
Alert Count                   3<br />
First Seen                    Wed Nov  5 08:18:39 2008<br />
Last Seen                     Wed Nov  5 08:18:39 2008<br />
Local ID                      d102b5a4-ac6f-470f-aa34-55ac37dafa37<br />
Line Numbers                  </p>
<p>Raw Audit Messages            </p>
<p>host=centos5-dev.hendricks.org type=AVC msg=audit(1225891119.851:12): avc:  denied  { read } for  pid=2634 comm="hpssd.py" name="libc.so.6" dev=dm-0 ino=1547246 scontext=system_u:system_r:hplip_t:s0 tcontext=system_u:object_r:file_t:s0 tclass=lnk_file</p>
<p>host=centos5-dev.hendricks.org type=SYSCALL msg=audit(1225891119.851:12): arch=40000003 syscall=5 success=no exit=-13 a0=b7fb2b4b a1=0 a2=bfd8a2b4 a3=8 items=0 ppid=2633 pid=2634 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm="hpssd.py" exe="/bin/env" subj=system_u:system_r:hplip_t:s0 key=(null)<br />
[root@centos5-dev ~]#<br />
</code><br />
The part that we are interested in is under the above heading <code>Allowing Access: You can execute the following command as root to relabel your computer system:<br />
"touch /.autorelabel; reboot"</code><br />
When we run this command this will fix our problem.  Note that these problems could run from accessing html pages to allowing a public web directory in your home directory.</p>
<p>Next up we have the command:<br />
<code><br />
chcon --reference<br />
</code><br />
Lets say you are using your localhost as your web server.  You decide that you want to add some virtual hosts.  You then add the virtual host directories outside of the normal /var/www/html directory.  You build your virtual hosts but now you can&#8217;t access them.  Watching your messages you see that this is definitely an selinux problem.  Using the above command we can fix our problem like this:<br />
<code><br />
chcon --reference  /var/www/html /srv/www/vhosts #This will fix the selinux properties on the root directory of the virtual hosts<br />
chcon -- reference /var/www/html/* /srv/www/vhosts/*  # This will fix the properties on the files in case they are different from the directory<br />
</code><br />
This code references the contexts of the given files or directories and applies them to the new files and directories.  Now every time that you add a file or directory under /srv/www/vhosts it will get the proper selinux context.</p>
<p>The last way that we are going to discuss is restorecon.  Taking the above scenario under either of the directories  you find that some files or directories did not pick up the correct context or maybe none at all.  Easy enough to fix:<br />
<code><br />
restorecon /var/www/html<br />
</code><br />
The reason this works is because the restorecon looks at the current contexts of the other files and directories and applies that context to the ones with the incorrect or no context.</p>
<p>There you have it.  Keep your sanity and still use SELinux.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/maintaining-your-sanity-with-selinux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Comments on 5 Things I Wish Linux Had</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/my-comments-on-5-things-i-wish-linux-had/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/my-comments-on-5-things-i-wish-linux-had/#comments</comments>
		<pubDate>Mon, 06 Oct 2008 21:09:49 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[desktop]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[paravirtualization]]></category>
		<category><![CDATA[red hat]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/my-comments-on-5-things-i-wish-linux-had/</guid>
		<description><![CDATA[I ran across this post from Ken Hess today. I usually hesitate to openly question what other people write and believe but I felt compelled to respond to this one. Ken says (paraphrased) 1. Built-in Paravirtualization &#8211; I want a distribution that is paravirtualized&#8211;that is to say, a distribution that comes out of the box [...]]]></description>
				<content:encoded><![CDATA[<p>I ran across this <a href="http://www.daniweb.com/blogs/entry3288.html">post</a> from Ken Hess today.  I usually hesitate to openly question what other people write and believe but I felt compelled to respond to this one.</p>
<p>Ken says (paraphrased)</p>
<blockquote><p>1. Built-in Paravirtualization &#8211; I want a distribution that is paravirtualized&#8211;that is to say, a distribution that comes out of the box ready to give you the virtualization you need as a hypervisor OS</p></blockquote>
<p>What&#8217;s wrong with <a href="http://centos.org">CentOS</a> or <a href="http://redhat.com">Red Hat</a>.  They both come ready with paravirtualization.  I am running on the laptop where I am writing this.  And I firmly believe that they are considered a major distribution.</p>
<blockquote><p>2. Applications on Demand &#8211; Instead of installing all the applications I want, or think I want, up front, I&#8217;d like to have the opportunity to install applications on demand. I want the icons already there as options but when I click the icon for the first time, the application installs, with all its damn dependencies and I have my application.</p></blockquote>
<p>It is my opinion that Open Source Developers are some of the best in the world.  I am sure that they could satisfy Ken&#8217;s desire for this.  Just one small problem-not everyone is going to want the same applications that Ken wants.  The developers are good..but they are not mind readers.</p>
<blockquote><p>3. Microsoft Office &#8211; No, I&#8217;m not selling out here and I know about <a href="http://www.openoffice.org/">OpenOffice.org</a> but come on, think of the user base that would come from that port. Linux users are typically anti-Microsoft but how many would still use Microsoft Office? And, how many companies might convert to Linux if MS Office were available for it? I don&#8217;t know, maybe it&#8217;s just me.</p></blockquote>
<p>Ken, I think it is just you.  People are moving away from Microsoft Office for two reasons: licensing cost and open document format.  Remember all of the hullabaloo a few months ago over open document format because Microsoft did not want to adhere to any standard that would allow people to translate their documents into another format?  Besides if you really wanted it <a href="http://">Crossover Office</a> at less than $50 should fit your meager budget and allow you to use Microsoft Office-that is if the license cost did not drive it over your budget.  </p>
<blockquote><p>4. A Non-Windows-Looking-Acting-Emulating Window Manager &#8211; Every Window Manager with the exception of maybe XFCE (which looks like MacOS X) looks like, and tries to emulate, Windows. Can&#8217;t someone come up with a different schema? Do we have to wait for Microsoft to come up with something so that we can copy it? Come on, get creative.</p></blockquote>
<p>For the life of me I cannot get my <a href="http://www.gnome.org/">Gnome</a> desktop to look like a Windows desktop let alone act like it.</p>
<blockquote><p>Plug in a peripheral and nothing happens&#8211;nothing visible at least. Why should I have to open a Terminal Window and mount a flash drive disk that I just stuck in my computer? Why can&#8217;t Linux mount it and open it to show me the contents? </p></blockquote>
<p>Are you using a recent version of Linux?  My digital camera and thumb drives all open a window when they are plugged in.</p>
<blockquote><p>As I said, Linux is fine for hackabee like me but we want regular people to want to use it too, right?</p></blockquote>
<p>Using Linux, except in very rare situations is no different than using a new version of Windows.  There is a learning curve about where things are placed, how to use the applications and so on.  It bugs me a little that I don&#8217;t use the command line as much as I used to.  As an administrator it is definitely a skill that I do not want to lose.</p>
<p>You can edit photos, create documents and spreadsheets, listen to music, browse the web, get email and so on with Linux.  And it takes no more work to do it than it does with Windows.  All without the command line.  This is more than suitable for most users, grandma and grandpa included.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/my-comments-on-5-things-i-wish-linux-had/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
