JUST OPEN SOURCE MATTERS!

September 8, 2008

How do I disable the ping response?

Filed under: Fedora, linux, open source, Ubuntu, Uncategorized — Tags: — egoleo @ 3:37 pm

Usually a ping is used to check if a machine is up and to check the network status.

It is a small network packet sent to the machine. If the machine is up, an answer will be sent. The time needed to get the answer is called ping time or round-trip time.

The ping response from an IP indicates the machine is up.

Unfortunately this can be used to quickly scan an IP-range for reachable hosts.

This can be used to find potential hackable machines. If your machine doesn’t answer to pings, your chance to be seen is reduced. (That doesn’t mean your machine is more secure, the machine is just not that easy to be seen from the internet. Nothing more.)

Add the following line to your init script for the network (the name depends on the distribution you use):

echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all

This disables ping responses.

To reenable, use the following command:

echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all

To make this permanent set the following into /etc/sysctl.conf (if you have such a file)

net.ipv4.conf.icmp_echo_ignore_all = 1

July 31, 2008

Changing Server Timezone On Ubuntu

Filed under: linux, Ubuntu — Tags: , — egoleo @ 6:51 am

Is amazing how sometimes such small issues on linux can frustrate a linux user.

I’m currently reconfiguring a machine on the other side of the globe, so I want to get it to work to IST instead of EST.

A quick google brought up a rather complex way of doing it which sounded really complex to me, so I refined my query and found the same solution in the Ubuntu documentation.

Simply run the following command as root (or using “su”):
sudo dpkg-reconfigure tzdata

And just follow the instructions.

No silly reboots or other craziness required.

To keep your server’s time in sync with the rest of civilisation setup a cronjob to poll an ntp server once every 24 hours:
/usr/sbin/ntpdate yourfavouritentpserveraddress

Problem solved 🙂

June 2, 2008

How to zip files on linux

Filed under: linux — Tags: , , — egoleo @ 9:55 am

Ziping files on linux using shell is one of the most easy things to do
but today i got a bit confused when a friend asked me how to zip a file with
a different name.
example : normally i zip with the source and target name all been same.

zip -r foobar foobar

which will result in

foobar.zip

but what my friend wanted was having a different name for the result.

So i had to jump straight to the linux channel on IRC. below is what i learnt from there.

zip -r foo.zip bar

which results in foo.zip

what abt unziping too

unzip foo.zip

but what about unziping to have different name .

unzip foo.zip && mv foo bar

Create a free website or blog at WordPress.com.