<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CentOS 6.4 on nagg.eu</title><link>https://nagg.eu/tags/centos-6.4/</link><description>Recent content in CentOS 6.4 on nagg.eu</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sun, 13 Oct 2013 16:06:38 +0000</lastBuildDate><atom:link href="https://nagg.eu/tags/centos-6.4/index.xml" rel="self" type="application/rss+xml"/><item><title>ipset, a clever and effective way to block indesired hosts</title><link>https://nagg.eu/ipset-a-clever-and-effective-way-to-block-indesired-hosts/</link><pubDate>Sun, 13 Oct 2013 16:06:38 +0000</pubDate><guid>https://nagg.eu/ipset-a-clever-and-effective-way-to-block-indesired-hosts/</guid><description>&lt;p&gt;This post is meant to be the sequel of the one I wrote one month ago about &lt;!-- raw HTML omitted --&gt;CentOS as router, transparent proxy, and much more&lt;!-- raw HTML omitted --&gt;.&lt;br&gt;
A big chunk of the precedent article is on how configure squid and squidGuard to act as a transparent proxy with URLs filtering capabilities.&lt;br&gt;
But there&amp;rsquo;s a problem with that: nowadays many sites (f4c3b00k.c0m just to name the most annoying one) are HTTPS.&lt;br&gt;
With HTTP one can really easily intercept a packet and read the payload (which contains the URL) but with HTTPS this is not possible anymore since the payload is encrypted.&lt;br&gt;
The only way to be able to read the payload of an HTTPS packet is doing a man-in-the-middle attack with a fake certificate, but that&amp;rsquo;s not advisable and you really don&amp;rsquo;t wanna do it.&lt;br&gt;
If, like in my case, we are not interested in what the users are doing but we just want them to not be able to access some sites/services/whatever ipset (combined with iptables) are the right tools for the job.&lt;br&gt;
iptables is a pretty powerful tool, the only real issue is that it doesn&amp;rsquo;t scale pretty well if the number of the rules is very big, and this is not a good thing since we probably want to blacklist thousands of IPs.&lt;br&gt;
And here comes ipset: with it it&amp;rsquo;s possible to manage huge blacklists without iptables slowing down.&lt;/p&gt;</description></item><item><title>CentOS as router, transparent proxy, and much more</title><link>https://nagg.eu/centos-as-router-transparent-proxy-and-much-more/</link><pubDate>Mon, 16 Sep 2013 18:59:19 +0000</pubDate><guid>https://nagg.eu/centos-as-router-transparent-proxy-and-much-more/</guid><description>&lt;p&gt;As usual, long story short: I&amp;rsquo;ve to setup a firewall to log traffic, block some stuff and do some other things.&lt;br&gt;
– epel repo is required –&lt;br&gt;
The system is made of a single CentOS machine with 2 physical network adapters:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;eth0, connected to WAN, static IP address 192.168.0.3&lt;/li&gt;
&lt;li&gt;eth1, connected to LAN, static IP address 10.0.0.1/24&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="-network-adapters-configuration"&gt;.:. Network adapters configuration&lt;/h2&gt;
&lt;p&gt;WAN network adapter:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;[root@CentOS ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=&amp;#34;eth0&amp;#34;
BOOTPROTO=&amp;#34;none&amp;#34;
HWADDR=&amp;#34;**:**:**:**:**:**&amp;#34;
IPADDR=192.168.0.3
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
DNS=192.168.0.1
IPV6INIT=&amp;#34;yes&amp;#34;
IPV6_AUTOCONF=&amp;#34;yes&amp;#34;
NM_CONTROLLED=&amp;#34;yes&amp;#34;
ONBOOT=&amp;#34;yes&amp;#34;
TYPE=&amp;#34;Ethernet&amp;#34;
UUID=&amp;#34;***&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;LAN network adapter:&lt;/p&gt;</description></item><item><title>nginx and TLS v1.2</title><link>https://nagg.eu/nginx-and-tls-v1-2/</link><pubDate>Sat, 10 Aug 2013 14:03:39 +0000</pubDate><guid>https://nagg.eu/nginx-and-tls-v1-2/</guid><description>&lt;p&gt;Given that SSL and TLS, especially v1.0, suffer from serious security issues (e.g. &lt;!-- raw HTML omitted --&gt;&lt;a href="https://en.wikipedia.org/wiki/Transport_Layer_Security#TLS"&gt;https://en.wikipedia.org/wiki/Transport_Layer_Security#TLS&lt;/a&gt;&lt;!-- raw HTML omitted --&gt;) I thought it would be a good idea to use the latest and more secure version of it: v1.2.&lt;br&gt;
On CentOS 6.4 the openssl version included is quite old and doesn&amp;rsquo;t support TLS v1.1 and 1.2.&lt;br&gt;
So, first of all we have to install the latest version 1.0.1e, it can be done compiling from sources or by adding a third party repository; I chose the latter.&lt;/p&gt;</description></item><item><title>Apache + nginx as reverse proxy</title><link>https://nagg.eu/apache-nginx-as-reverse-proxy/</link><pubDate>Fri, 21 Jun 2013 16:11:13 +0000</pubDate><guid>https://nagg.eu/apache-nginx-as-reverse-proxy/</guid><description>&lt;p&gt;One of the things I was planning to do but never did is installing nginx as &lt;!-- raw HTML omitted --&gt;reverse proxy&lt;!-- raw HTML omitted --&gt; in front of Apache.&lt;br&gt;
nginx is present in the epel repos for CentOS, so the installation process is just a matter of:&lt;!-- raw HTML omitted --&gt;&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum install nginx mysql mysql-server phpmyadmin httpd
&lt;/code&gt;&lt;/pre&gt;&lt;!-- raw HTML omitted --&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;wget -q -O - http://www.atomicorp.com/installers/atomic | sh
&lt;/code&gt;&lt;/pre&gt;&lt;!-- raw HTML omitted --&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;yum install mod_rpaf
&lt;/code&gt;&lt;/pre&gt;&lt;!-- raw HTML omitted --&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;mkdir /etc/nginx/v.hosts
&lt;/code&gt;&lt;/pre&gt;&lt;!-- raw HTML omitted --&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;vi /etc/nginx/nginx.con
&lt;/code&gt;&lt;/pre&gt;&lt;!-- raw HTML omitted --&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;http {
 include v.hosts/*.conf;
 include /etc/nginx/mime.types;
 default_type application/octet-stream;
 
 log_format main &amp;#39;$remote_addr - $remote_user [$time_local] &amp;#34;$request&amp;#34; &amp;#39;
 &amp;#39;$status $body_bytes_sent &amp;#34;$http_referer&amp;#34; &amp;#39;
 &amp;#39;&amp;#34;$http_user_agent&amp;#34; &amp;#34;$http_x_forwarded_for&amp;#34;&amp;#39;;
 
 access_log /var/log/nginx/access.log main; 
 
 charset utf-8;
 keepalive_timeout 65;
 server_tokens off;
 sendfile on;
 tcp_nopush on;
 tcp_nodelay off;
 
# Default Server Block to catch undefined host names
# server {
# listen 80;
# server_name _; 
# root /usr/share/nginx/html;
# index index.html index.htm; }
}
&lt;/code&gt;&lt;/pre&gt;&lt;!-- raw HTML omitted --&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;/usr/sbin/nginx -t
&lt;/code&gt;&lt;/pre&gt;&lt;!-- raw HTML omitted --&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt; server {
 listen 80;
	 server_name nagg.eu;
 
 access_log off;
 error_log off;
 
 location / {
 proxy_pass http://127.0.0.1:8080;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header Host $host;
 proxy_redirect off;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 proxy_connect_timeout 90;
 proxy_send_timeout 90;
 proxy_read_timeout 90;
 client_max_body_size 10m;
 client_body_buffer_size 128k;
 proxy_buffer_size 4k;
 proxy_buffers 4 32k;
 proxy_busy_buffers_size 64k;
 }
 }
&lt;/code&gt;&lt;/pre&gt;&lt;!-- raw HTML omitted --&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;sudo /usr/sbin/nginx -t
service nginx restart
&lt;/code&gt;&lt;/pre&gt;&lt;!-- raw HTML omitted --&gt;
&lt;!-- raw HTML omitted --&gt;</description></item><item><title>XRDP and CentOS 6</title><link>https://nagg.eu/xrdp-and-centos-6/</link><pubDate>Fri, 26 Apr 2013 14:30:32 +0000</pubDate><guid>https://nagg.eu/xrdp-and-centos-6/</guid><description>&lt;p&gt;Yesterday&amp;rsquo;s night I installed a test machine to play with KVM and some other stuff, obviously the OS of choice is the trusty CentOS.&lt;br&gt;
I did a pretty minimal net-install but decided to install gnome desktop environment anyway because why not, not that it will be of much use, but still.&lt;br&gt;
Anyway, since the machine is an headless server it&amp;rsquo;s mandatory to be able to control it remotely, like the past 2 or 3 times, I installed XRDP expecting everything will be fine and working without any problem.&lt;br&gt;
And here is when I was wrong.&lt;br&gt;
It&amp;rsquo;s been quite a long time since the last time I installed XRDP somewhere, but I clearly remember it working flawless without any kind of manual configuration.&lt;br&gt;
I did the usual &lt;code&gt;yum install xrdp&lt;/code&gt;, confirm the installation, bla bla bla, &lt;code&gt;service xrdp start&lt;/code&gt; and both &lt;code&gt;sesman&lt;/code&gt; and &lt;code&gt;xrdp&lt;/code&gt; started with no problem.&lt;br&gt;
Then, when I went back to my workstation (Fedora 18 x64) and tried to connect to the server using Remmina Remote Desktop Client at first it seems to be working but once I typed user ID, password and press OK I got prompted the following error:&lt;/p&gt;</description></item></channel></rss>