jump to navigation

Restricting Access to Directory Contents using Apache May 22, 2013

Posted by networknuts in Indian Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.
Tags: , , , , , , , , , , , , ,
add a comment

Video by Network NUTS. Shows how you can configure Apache web server to share contents like files etc from some directory locations. Then it will show you how to take some directory “offline” for some maintenance work. Further it explain how to restrict access to directories based on IP. It will then cover how you can use URL based rules to limit access to certain directories. Lastly it demonstrate you how to block certain file types not to get published.

This is something they never taught in any official Linux Training.

GPG Keys. Send file to multiple recipients. May 15, 2013

Posted by networknuts in Indian Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.
Tags: , , , , , , , , , , , , , , , ,
add a comment

GEEKS!!

If you remember your RHCE Training or RHCSS (RH333) Training you must be remembering how to use the GPG keys to encrypt and decrypt the files and send it to other recipients without being bothered about sharing the “password”.

Now here is a very small trick.

If you want to send one file to multiple recipients using GPG you can either execute the command -

gpg –encrypt –recipient nameofperson filename

multiple times and by replacing the nameofperson each time.

Other smart way can be that you can use a slightly smart version of GPG command -

gpg -r firstperson -r secondperson -r thirdperson –encrypt filename

In the second case, GPG will gpg will use the public key of all the recipients to encrypt the data and any one of their private keys can decrypt the data.

You just need to make sure that you have “imported” all the persons GPG keys before executing this command.

Save Storage Space use hardlinks May 9, 2013

Posted by networknuts in Indian Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.
Tags: , , , , , , , , , , ,
add a comment

GEEKS !!

Consider this.

You suspect that there are some huge duplicated file (can be movies, songs) in your HDD. But its very difficult to scan each directory for “duplicate stuff”.

What to do?

Please welcome a tool - hardlinks.

This hardlinks is not same what you had learned during your RHCE Training.

It consolidate duplicate files via hardlinks. This is a package that automatically walks through files, on the same filesystem, looking for duplicates. When a duplicate is found, one file is chosen as the master and the other duplicate matches link to this
master.

Here is a small illustration of its working from my machine.

PS: If you edit the file with emacs, it will not save changes in both places. Because the default settings of emacs save the contents into a new file, you’ll only get the changes made in the file you’re editing. If you had made a soft link (ln -s), then, changing one file with emacs will change the other … just an important point

Hardlinks package

Hardlinks package

to note.

biosdecode May 8, 2013

Posted by networknuts in Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.
Tags: , , , , , , , , , , , ,
add a comment

GEEKS !!

You can use “biosdecode” command to get information about your BIOS from the command prompt.

biosdecode information

biosdecode information

 

HDD & CPU Temperature May 6, 2013

Posted by networknuts in Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.
Tags: , , , , , , , , , , , , , , ,
add a comment

GEEKS !!

There is a very small but useful tool to monitor your CPU and HDD temperature. (not covered in official RHCE Training or RHCSS Training)

Can be very useful before you think of putting additional cooling devices.

You can use acpi -V for monitoring CPU temperature.

You can use hddtemp /dev/sda for monitoring HDD temperature.

Below is a small illustration from my machine.

HDD and CPU Temperature

HDD and CPU Temperature

Apache IP based Access May 4, 2013

Posted by networknuts in Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.
Tags: , , , , , , , , , , , , , , , , ,
add a comment

GEEKS !!!

Here are some of the basics of restricting IP based access to directories in Apache i.e. /etc/httpd/conf/httpd.conf. I hope you still remember your RHCE Training.

Now these all 3 setting are the same.

10.0.0.0/255.0.0.0
10.0.0.0/8
10

But, this one is different

10.0.0.0/24 only allows 10.0.0.1 to 10.0.0.254

Here are some examples for your from /etc/httpd/conf/httpd.conf 

<Directory /var/www/html/networknuts>
Order allow,deny
Allow from 10.0.0.0/8 # All 10.
Allow from 192.168.0.0/16 # All 192.168
Allow from 127 # All 127.
</Directory>

Here’s an example that only allows access to .html files
and nothing else for a particular directory.

<Directory “/var/www/html/networknuts/secured”>
Satisfy All
Order allow,deny
Deny from all
<Files *.html>
Order deny,allow
Allow from all
Satisfy Any
</Files>
</Directory>

GEEKS don’t forget to reload httpd with the following command.

/etc/init.d/httpd reload

Enjoy your Sunday.

Kerberos with Telnet and SSH May 1, 2013

Posted by networknuts in Indian Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.
Tags: , , , , , , , , , , , , , , , , , , ,
add a comment

Video by Network NUTS. Shows how to integrate telnet with kerberos and ssh. Basic knowledge of kerberos working and configuration is appreciated. Integrating telnet and ssh with kerberos helps you secure the authentication mechanism used by kerberos and also allow password less authentication to ssh and telnet servers.

Connect with Alok Srivastava on facebook – http://www.facebook.com/alokaryan
Connect with Network NUTS facebook page – http://www.facebook.com/networknuts
Visit our official website – http:/www.networknuts.net
Read tips and tricks on our wordpress blog – http://www.networknuts.wordpress.com

 

libwrap dependency May 1, 2013

Posted by networknuts in Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.
Tags: , , , , , , , , , , , , , , , , ,
add a comment

GEEKS !!

Hope you still remember your RHCE Training and TCP Wrapper’s /etc/hosts.allow and /etc/hosts.deny files.

You have used these files to control those services those are “libwrap” dependent. You must be aware that TCP Wrapper can manage only those services which uses libwrap.so library files.

Yes you can use the “ldd” command to find out that whether a particular service can be managed via TCP Wrapper or not. But, this can be a very lengthy job if you intend to control number of services.

So the better way is to get the list of all the binaries / services those are dependent on “libwrap” and do it once.

GEEKS !! You can use the egrep command for this purpose.

Here is a small illustration from my machine. First ldd command showing the output for a single service and then I have used egrep to get a list of all the services using libwrap.

Finding libwrap dependent services

Finding libwrap dependent services

 

Checksum openssl April 24, 2013

Posted by networknuts in Indian Certified Networking Institute, Linux Hacks, Linux Tips Tricks, linux training in india, Red Hat, redhat linux, rhce, rhce training, RHCSS.
Tags: , , , , , , , , , , , , , , ,
add a comment

GEEKS !!

I know, that you all know, how to use the checksum or hashes to check the integrity of your important files.

This is something you had already learned in your RHCE Training or RHCSS Training (specially RH333).

You all have used the openssl command or md5sum or cksum to generate the hash and check whether the data integrity is lost or not.

But sometimes reading the checksum can be a real pain for the eyes. So here is a very small feature with openssl that makes your eyes smile and making your job of reading checksum easy.

Just try using -c option while generating the checksum. It will separate the checksum with : so making it easy to read.

Here is a small illustration and comparison from my machine.

checksum in linux

checksum in linux

Follow

Get every new post delivered to your Inbox.

Join 525 other followers