 




<?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; red hat</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/linux-lotus-domino/tag/red-hat/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>Red Hat and Microsoft enter virtualization support agreement</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/red-hat-and-microsoft-enter-virtualization-support-agreement/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/red-hat-and-microsoft-enter-virtualization-support-agreement/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 00:01:08 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[support]]></category>
		<category><![CDATA[Virtualization]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/?p=177</guid>
		<description><![CDATA[Red Hat and Microsoft have entered into a virtualization agreement. The agreement is designed so that Red Hat and Microsoft customers using virtualization from both companies can get support from either group. Red Hat and Microsoft both emphasize that this agreement is not the same as the agreement that Microsoft has with Novell. That agreement [...]]]></description>
				<content:encoded><![CDATA[<p>Red Hat and Microsoft have entered into a virtualization agreement.  The agreement is designed so that Red Hat and Microsoft customers using virtualization from both companies can get support from either group.</p>
<p>Red Hat and Microsoft both emphasize that this agreement is not the same as the agreement that Microsoft has with Novell.  That agreement covers such things as intellectual property, code indemnification and licensing.</p>
<p>Red Hat and Microsoft still very much remain competing platform vendors.  Red Hat&#8217;s GM of virtualization Mike Neil emphasizes that &#8220;these agreements do not include any patent or other IP licensing rights.&#8221;  The agreement with Novell is more of a partnership agreement where Microsoft gives it&#8217;s customers coupons to purchase SuSE Linux Enterprise Server from Novell.</p>
<p>Red Hat and Microsoft will enter into each other&#8217;s validation phases for their respective virtualization technologies.  The results of these tests will be posted throughout the year on the Red Hat and Microsoft websites.</p>
<p>With the base of heterogenous hosts and virtual guests I suspect this is not the only agreement like this that we will see.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/red-hat-and-microsoft-enter-virtualization-support-agreement/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>Travels of a Linux consultant &#8211; Day 1</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/travels-of-a-linux-consultant-day-1/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/travels-of-a-linux-consultant-day-1/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 01:53:34 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[consultant]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[suse]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/?p=117</guid>
		<description><![CDATA[It&#8217;s been a few days since I&#8217;ve had a chance to write so I want to catch up. I recently accepted a 3-5 week consulting job about 400 miles from where I live. I had to leave in the late afternoon because I had an interview for another job, this one closer to home and [...]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s been a few days since I&#8217;ve had a chance to write so I want to catch up.</p>
<p>I recently accepted a 3-5 week consulting job about 400 miles from where I live. I had to leave in the late afternoon because I had an interview for another job, this one closer to home and about 60 miles in the wrong direction.  This meant that I wouldn&#8217;t actually be on the road until 1500 EST or later.</p>
<p>After the interview off I went.  About 90 miles into the drive my truck started missing so badly that it was shaking as I drove and the &#8220;Service Engine Soon&#8221; light came on.</p>
<p>I called my wife and asked her to locate an auto parts store in the town that was coming up, Champaign, IL.  60 miles of a teeth rattling miss in my engine.  This was fun.  She called back with directions to a store that was about 10 minutes off of the highway.</p>
<p>I arrived there about 1700 CST.  If you&#8217;ve ever been in the midwest in January you know that it starts getting dark between 1730-1800.  I had them put a tester on the truck and sure enough the Coil on Plug 3 was bad.  To top off everything it was 10 degrees F outside.</p>
<p>I had somewhat expected something like this as my truck had been acting up for the last few days.  With that in mind I had brought along enough tools to pull a spark plug which meant I had the necessary tools to remove the coil.</p>
<p>I don&#8217;t know if you&#8217;ve ever been under the hood of an F150 4 wheel drive but some of the plugs and coils can be difficult to reach.  It is also high enough that it is helpful if you have a step stool of some sort.  Fortunately the coil/plug 3 is not under the firewall so it wasn&#8217;t too bad.  I did have to crawl up onto the grill housing to get to the coil though.</p>
<p>I bought the coil and went to work.  It took me about 10 or 15 minutes to get the old coil off and another 20-30 to get the new one on.  By now I&#8217;m working by the light of the auto parts store and the temperature is dropping.  Cold, very cold.  I&#8217;m glad the wind wasn&#8217;t blowing or it would have almost been unbearable.</p>
<p>The rest of the drive was uneventful although driving through St. Louis wasn&#8217;t much fun.  Finally I reach the hotel in Rolla, MO about 2200 CST.  This puts me about 4-5 hours from my destination.  Ahh, I say to myself, the hotel has wireless and breakfast so I&#8217;ll just hit the sack and check email and what have you tomorrow morning.</p>
<p>So much for day 1.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/travels-of-a-linux-consultant-day-1/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>Inventory tracking with the Sun Inventory Application</title>
		<link>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/inventory-tracking-with-the-sun-inventory-application/</link>
		<comments>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/inventory-tracking-with-the-sun-inventory-application/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 18:41:36 +0000</pubDate>
		<dc:creator>Xjlittle</dc:creator>
				<category><![CDATA[inventory]]></category>
		<category><![CDATA[inventory tag]]></category>
		<category><![CDATA[Lotus Domino]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[red hat]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[suse]]></category>
		<category><![CDATA[tag your gear]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://itknowledgeexchange.techtarget.com/linux-lotus-domino/inventory-tracking-with-the-sun-inventory-application/</guid>
		<description><![CDATA[Sun has a unique application on their web site called Sun Inventory that will track hardware, software and operating systems. It is unique in that it is, more or less, a cloud application. You can access your inventory anywhere that you have internet access. The Sun Inventory application tracks these items by installing a small [...]]]></description>
				<content:encoded><![CDATA[<p>Sun has a unique application on their web site called Sun Inventory that will track hardware, software and operating systems.  It is unique in that it is, more or less, a cloud application.  You can access your inventory anywhere that you have internet access.</p>
<p>The Sun Inventory application tracks these items by installing a small application on the machine that you want to inventory.  Initially it will report back the hardware and operating system.  As qualified applications are installed the agent will report these back to the Sun Inventory application without any interaction on your part.</p>
<p>Getting started is simple.  Go <a href="https://inventory.sun.com/inventory/">here</a> to get started.   If you don&#8217;t have a Sun account go ahead and sign up.  Once you are signed in it is a 3 step process to get started.</p>
<p>Step one is to download what are known as service tags.  This is the application that you will install to &#8220;tag&#8221; your inventory so that it can be put into the application.  Tags are available for Red Hat Enterprise Linux, Suse Enterprise Linux, Solaris and Windows.  Download the appropriate tag for your operating system and install it on the machine on which you want to inventory.  The tagging also works on Virtualized Machines from Red Hat Virtualization and from VMs using Virtual Box.  I didn&#8217;t check any other virtualization applications.</p>
<p>Steps two and three are discovering and registering your &#8220;gear&#8221; as Sun calls it.  This downloads a small java program onto your machine to help in finding and registering tag ready machines.  With this application you can find your machines in various ways such as hostname, subnet and ip address. Below is a screen shot of the information that you can use to find your tagged your machines.</p>
<p><a href='http://itknowledgeexchange.techtarget.com/linux-lotus-domino/inventory-tracking-with-the-sun-inventory-application/find-and-tag/' rel='attachment wp-att-74' title='Find and Tag'><img src='http://cdn.ttgtmedia.com/ITKE/uploads/blogs.dir/77/files/2008/12/step2.jpg' alt='Find and Tag' /></a> </p>
<p>Once you have done this a screen will pop up showing the gear that the registration client found.  You will then login to your Sun Account and choose which products that you want to register.  Once they are registered what you will see is like the following screen shot.</p>
<p><a href='http://itknowledgeexchange.techtarget.com/linux-lotus-domino/inventory-tracking-with-the-sun-inventory-application/inventory-listing-from-sun/' rel='attachment wp-att-75' title='inventory listing from Sun'><img src='http://cdn.ttgtmedia.com/ITKE/uploads/blogs.dir/77/files/2008/12/sun-inventory-site.jpg' alt='inventory listing from Sun' /></a></p>
<p>As you can see I have my 1u server tagged along with the host and virtual operatings systems.  The OpenSolaris machine is running on Virtual Box.  The OpenOffice application was installed after I tagged and registered the machine.  Since the tag runs as a service it picked up the OpenOffice application and registered it as part of the OpenSolaris machine.</p>
<p>This is a great way to get your machines and related software inventoried and get control of it.</p>
<p>-j</p>
<!-- wpms-network-global-inserts -->]]></content:encoded>
			<wfw:commentRss>http://itknowledgeexchange.techtarget.com/linux-lotus-domino/inventory-tracking-with-the-sun-inventory-application/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>
	</channel>
</rss>
