<?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>Archiwa Oracle Linux - soban</title>
	<atom:link href="https://soban.pl/category/oracle-linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://soban.pl/category/oracle-linux/</link>
	<description>IT, Linux, Servers, Security</description>
	<lastBuildDate>Sat, 06 Nov 2021 13:54:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>Improving encryption on old red hat 5 by new Oracle Linux 7 using apache mod_proxy</title>
		<link>https://soban.pl/improving-encryption-on-old-red-hat-5-by-new-oracle-linux-7-using-apache-mod_proxy/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Sat, 06 Nov 2021 13:54:17 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Network]]></category>
		<category><![CDATA[Oracle Linux]]></category>
		<category><![CDATA[Proxy]]></category>
		<category><![CDATA[Red Hat 5]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SSL]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=308</guid>

					<description><![CDATA[<p>There are situations when we need to increase the encryption level on the old system &#8211; according to the PCI audit requirements. However, the old system is no longer supported, so updating the encryption level is not possible. This is not a recommended solution, because we should try to transfer the application to a new [&#8230;]</p>
<p>Artykuł <a href="https://soban.pl/improving-encryption-on-old-red-hat-5-by-new-oracle-linux-7-using-apache-mod_proxy/">Improving encryption on old red hat 5 by new Oracle Linux 7 using apache mod_proxy</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>There are situations when we need to increase the encryption level on the old system &#8211; according to the PCI audit requirements. However, the old system is no longer supported, so updating the encryption level is not possible. This is not a recommended solution, because we should try to transfer the application to a new system. After all, when we have little time, it is possible to hide the old version of the system and allow only the new machine to move to it. In this particular example, we will use mod_proxy as a proxy to redirect traffic to the old machine, while using iptables we will only allow communication with the new machine. It is not a recommended solution, but it works and I would like to present it here. The systems that I will be basing on in this example are the old <strong>red hat 5</strong> and the new <strong>oracle linux 7</strong>. Recently, it has become very important to use a minimum of <strong>tls 1.2</strong> and none below for banking transactions. Let&#8217;s start with the proxy server configuration <strong>oracle linux 7</strong>.</p>



<p>As of this writing, the addressing is as follows:<br><strong>new_machine</strong> IP: <strong>10.10.14.100</strong><br><strong>old_machine</strong> IP: <strong>10.10.14.101</strong><br>Traffic will be routed on port 443 from new_machine to old_machine.</p>



<p>Before we go to proxy configuration, please make sure there are network transitions from new_machine (10.10.14.100) to old_machine (10.10.14.101) to port 443. You can read how to verify network connections here: <strong><a href="https://soban.pl/check-network-connection-and-open-tcp-port-via-netcat/" target="_blank" rel="noreferrer noopener">check network connection and open tcp port via netcat</a></strong>.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="544" height="51" src="https://soban.pl/wp-content/uploads/2021/11/image-13.png" alt="" class="wp-image-309" srcset="https://soban.pl/wp-content/uploads/2021/11/image-13.png 544w, https://soban.pl/wp-content/uploads/2021/11/image-13-300x28.png 300w" sizes="(max-width: 544px) 100vw, 544px" /></figure>



<p>We go to the installation of apache and mod_proxy:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># yum install httpd mod_proxy</pre></div>



<p>After installing apache, go to the edition:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># vi /etc/httpd/conf.d/ssl.conf</pre></div>



<p>Below are the news on the check level, what are the updates, and ip on the next service update:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">&lt;VirtualHost _default_:443&gt;
SSLProtocol -all +TLSv1.2
SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:!NULL:!RC4:!RC2:!DES:!3DES:!SHA:!SHA256:!SHA384:!MD5+HIGH:+MEDIUM:!KRB5
#…
&lt;IfModule mod_proxy.c&gt;
SSLProxyProtocol all
SSLProxyEngine on
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyRequests On
    &lt;Proxy *&gt;
        Require all granted
    &lt;/Proxy&gt;
    # backend server and forwarded path
    ProxyPass / https://10.10.14.101/
    ProxyPassReverse / https://10.10.14.101/
&lt;/IfModule&gt;
&lt;/VirtualHost&gt;</pre></div>



<p>In order to verify the correctness of apache configuration, you can issue a command that will check it:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># service httpd configtest</pre></div>



<p>If the apache configuration is correct, we can proceed to reloading apache:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># service httpd restart</pre></div>



<figure class="wp-block-image size-full"><img decoding="async" width="621" height="50" src="https://soban.pl/wp-content/uploads/2021/11/image-14.png" alt="" class="wp-image-310" srcset="https://soban.pl/wp-content/uploads/2021/11/image-14.png 621w, https://soban.pl/wp-content/uploads/2021/11/image-14-300x24.png 300w" sizes="(max-width: 621px) 100vw, 621px" /></figure>



<p>At this point, we have a configured proxy connection. Before we move on to limiting traffic with iptables, I suggest you go to the site &#8211; with the new mod_proxy configured and test if everything is working properly and if there are any problems with the application.</p>



<p>Once everything is working fine, the network transitions are there, we can go to the iptables configuration for red hat 5. Let&#8217;s start by checking the system version:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># cat /etc/redhat-release</pre></div>



<figure class="wp-block-image size-full"><img decoding="async" width="663" height="48" src="https://soban.pl/wp-content/uploads/2021/11/image-15.png" alt="" class="wp-image-311" srcset="https://soban.pl/wp-content/uploads/2021/11/image-15.png 663w, https://soban.pl/wp-content/uploads/2021/11/image-15-300x22.png 300w" sizes="(max-width: 663px) 100vw, 663px" /></figure>



<p>Now we are going to prepare iptables so that the network traffic is available on port 443 from the new_machine (10.10.14.100). To do this, edit the file <strong>/etc/sysconfig/iptables</strong>:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp --dport 443 -s 10.10.14.100 -j ACCEPT
-A INPUT -p tcp --dport 443 -j DROP
-A INPUT -p tcp --dport 80 -j DROP
-A INPUT -j ACCEPT
COMMIT</pre></div>



<p>After iptables settings are correct, we can reload the service:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># /etc/init.d/iptables restart</pre></div>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="886" height="153" src="https://soban.pl/wp-content/uploads/2021/11/image-16.png" alt="" class="wp-image-313" srcset="https://soban.pl/wp-content/uploads/2021/11/image-16.png 886w, https://soban.pl/wp-content/uploads/2021/11/image-16-300x52.png 300w, https://soban.pl/wp-content/uploads/2021/11/image-16-768x133.png 768w" sizes="auto, (max-width: 886px) 100vw, 886px" /></figure>



<p>In this way, we managed to cover up the weak encryption by proxying and diverting traffic to the new machine. This is not a recommended solution and you should try to transfer the application to a new environment compatible with the new system. However, in crisis situations, we can use this solution. Network traffic is not allowed by other IP addresses, so scanners will not be able to detect weak encryption on the old machine, and users using the old environment will not be able to use it. This does not change the fact that weak encryption is still set in the old environment and needs to be corrected. The example I gave is for the old <strong>red hat 5</strong> and the new <strong>oracle linux 7</strong>, but it can be assumed that a similar solution and configuration is possible for other versions of the system.</p>
<p>Artykuł <a href="https://soban.pl/improving-encryption-on-old-red-hat-5-by-new-oracle-linux-7-using-apache-mod_proxy/">Improving encryption on old red hat 5 by new Oracle Linux 7 using apache mod_proxy</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Error on Oracle Linux 7 rpmdb: BDB0113</title>
		<link>https://soban.pl/error-on-oracle-linux-7-rpmdb-bdb0113/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Tue, 12 Oct 2021 15:32:31 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle Linux]]></category>
		<category><![CDATA[Patching]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=104</guid>

					<description><![CDATA[<p>Sometimes on Oracle Linux there is problem, when you try use &#8220;yum&#8221; and get error like this: The fixing of this problem, you can try rebuild db: And then should work: That&#8217;s all!</p>
<p>Artykuł <a href="https://soban.pl/error-on-oracle-linux-7-rpmdb-bdb0113/">Error on Oracle Linux 7 rpmdb: BDB0113</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Sometimes on Oracle Linux there is problem, when you try use &#8220;yum&#8221; and get error like this:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># yum update

error: rpmdb: BDB0113 Thread/process 16934/140571185240320 failed: BDB1507 Thread died in Berkeley DB library

error: db5 error(-30973) from dbenv-&gt;failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery

error: cannot open Packages index using db5 -  (-30973)

error: cannot open Packages database in /var/lib/rpm

CRITICAL:yum.main:

 

Error: rpmdb open failed</pre></div>



<p>The fixing of this problem, you can try rebuild db:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># rpm --rebuilddb</pre></div>



<p>And then should work:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag"># yum update</pre></div>



<p>That&#8217;s all!</p>
<p>Artykuł <a href="https://soban.pl/error-on-oracle-linux-7-rpmdb-bdb0113/">Error on Oracle Linux 7 rpmdb: BDB0113</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
