Category: Uncategorized

IPTables – Filter ICMP Address Mask Request & Replies

Here’s how to filter or block ICMP address mask requests and replies. On Redhat/CentOS, edit /etc/sysconfig/iptables and add the following lines -A RH-Firewall-1-INPUT -p ICMP –icmp-type address-mask-request -j DROP -A RH-Firewall-1-INPUT -p ICMP –icmp-type address-mask-reply -j DROP and then run: /sbin/iptables restart Or run the following commands: /sbin/iptables -I RH-Firewall-1-INPUT 1 -p ICMP –icmp-type address-mask-request -j DROP /sbin/iptables -I RH-Firewall-1-INPUT 1 -p ICMP –icmp-type address-mask-reply -j DROP /sbin/service iptables save Recently on an Ubantu server we just added these lines to /etc/rc.local: /sbin/iptables -I INPUT 1 -p ICMP –icmp-type address-mask-request -j DROP /sbin/iptables -I INPUT 1 -p ICMP –icmp-type address-mask-reply -j DROP

Read More »

RewriteCond -d/-f Not Working With HTTP Basic Auth.

Lets say you have this is the document root .htaccess:

This is the kind of rewrite that WordPress, Mambo and others use to provide SEO urls. Now create a folder in the document root and add a .htaccess to the folder with commands to require HTTP Basic authentication. Requests to the folder will end up being sent to /index.php and the application will generate a 404 error. The fix is to change the rewrite rules to:

This allows the invisible /401.shtml request needed for authentication to skip the rewrite rule and function corrrectly.

Read More »

Howto Configure Ethernet Bridge

Let’s assume you have a server with two Ethernet network interface. You wish to bridge traffic between the interfaces. Here are the commands to setup the bridge: 1. Take eth0 off line

2. Take eth1 off line

3. Define a bridge named “bridge01”

4. Add eth0 to the bridge named “bridge01”

5. Add eth1 to the bridge named “bridge01”

6. Bring up the Ethernet interfaces with no IP addresses:

7. Bring the bridge online with a single ip address

Try to test by ping from one side of the bridge to the other. It may take up to 30 seconds for the ping to start running due to the learning phase on the bridge. If it fails then double check the above setup. Take a look at the MAC addresse that the bridge sees with:

Verify that there is no bridge filtering

Read More »

vsftpd long username bug

Here’s a patched source RPM for the vsftpd package included with RHEL5. It fixes this bug: https://bugzilla.redhat.com/show_bug.cgi?id=486524 The bug limits user names to 32 characters. The patch raises the limit to 128 characters. To build and install do:

You can download the patched source file here: http://blogs.reliablepenguin.com/files/vsftpd-2.0.5-12longuser.src.rpm

Read More »

Yum : Howto download source packages

First get the yum-utils package if you don’t already have it:

Next just do:

where mypkg is the package that you want source for.

Read More »

Categories

Get a free consultation from Reliable Penguin

Submit the form—or for immediate service call 866-649-7984.