Categories: Linux, Distributions, Debian, Mandrake, RedHat, Networking

Pages: 1 2 3 4 5 6 7 8 9 10 11 ... 12 >>

03/30/10

Permalink 05:25:34 am, by admin Email , 57 words   English (US)
Categories: Linux, Networking

Block IP Address With IPTables

Need to block am IP address from your server? Here's an IPTables command:

/sbin/iptables -I INPUT -s w.x.y.z -j DROP

where w.x.y.z is the IP address to be blocked.

Here's a way to block and address with just the route command:

/sbin/route add -host w.x.y.z reject

02/23/10

Permalink 10:12:58 am, by admin Email , 83 words   English (US)
Categories: Linux

RHEL5 Server Hardening

The National Security Agency publishes a great collection of documents that provide detailed security configuration guidelines. The full index can be found here:

http://www.nsa.gov/ia/guidance/security_configuration_guides/index.shtml

We particularly like the guides for RedHat EL5:

“Hardening Tips For Default Installation of Red Hat Enterprise Linux 5”
http://www.nsa.gov/ia/_files/factsheets/rhel5-pamphlet-i731.pdf

“Guide to the Secure Configuration of Red Hat Enterprise Linux 5”
http://www.nsa.gov/ia/_files/os/redhat/rhel5-guide-i731.pdf

11/17/09

Permalink 07:23:17 am, by admin Email , 112 words   English (US)
Categories: Networking

IPTables - Filter ICMP Timestamp Requests & Replies

Here's how to filter or block ICMP timestamp requests and replies.

On Redhat/CentOS, edit /etc/sysconfig/iptables and add the following lines

-A RH-Firewall-1-INPUT -p ICMP --icmp-type timestamp-request -j DROP
-A RH-Firewall-1-INPUT -p ICMP --icmp-type timestamp-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 timestamp-request -j DROP
/sbin/iptables -I RH-Firewall-1-INPUT 1 -p ICMP --icmp-type timestamp-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 timestamp-request -j DROP
/sbin/iptables -I INPUT 1 -p ICMP --icmp-type timestamp-reply -j DROP

08/11/09

Permalink 07:04:05 am, by admin Email , 137 words   English (US)
Categories: Linux

ftps with lftp

lftp support ftps (different from sftp). ftps is ftp over an explicit TLS (SSL) connection. We've seen a few sites running MS IIS that require ftps and getting lftp to work has been tricky. To make it work verify that your lftp build has gnutls support compiled in with:

lftp -v

This build does not:

Libraries used: Readline 5.1, Expat 1.95.8, OpenSSL 0.9.8d 28 Sep 2006

Here's one that does:

Libraries used: Readline 5.1, Expat 1.95.8, GnuTLS 2.6.6, zlib 1.2.3

Once you have have TLS support in your lftp build then you can put a file with something like this:

lftp -c 'open -e "set ftps:initial-prot ""; \
   set ftp:ssl-force true; \
   set ftp:ssl-protect-data true; \
   put test.txt; " \
   -u "USERNAME","PASSWORD" \
   ftps://HOSTNAME:990 '

The option sets are critical as lftp wants to do "PROT C" by default but Windows wants to see "PROT P".

04/24/09

Permalink 09:20:15 am, by admin Email , 31 words   English (US)
Categories: Linux, RedHat

Mount Windows drive share on RHEL5

RHEL5 replaced the old smbmount command with mount.cifs so to mount a shared Windows drive do something like:


mount -t cifs //servername/sharename /mnt/mountpoint \
-o username=myusername,password=mypassword

1 2 3 4 5 6 7 8 9 10 11 ... 12 >>

July 2010
Sun Mon Tue Wed Thu Fri Sat
 << <   > >>
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Reliable Penguin offers Linux Server Migrations, Systems Administration & Programming. Visit our main website at:

http://www.reliablepenguin.com

Search

Bookmark and Share

XML Feeds

powered by b2evolution