A Journey of images

Server administration IPTABLES and IFTOP

Posted by: gerritvisagie on: November 8, 2011

If you are experiencing a problem with your webserver running slow or think you might have a dos attack on your hands, here is a trick i use to make sure i block any suspisious IP’s.

I use 2 packages on my Ubuntu server to have a look at what is going on.

Iftop easily obtained with

apt-get install iftop

Run it and have a look, it gives you the source ip and ports that are being accessed

 Press P to display ports  and N for DNS resolution

 Personally I prefer it off

 You can lookup any suspicious ip addresses  with ip-lookup.net/ 

Now you will have to look for any suspicious ip addresses that should not be accessing especially SSH and using high volumes of data especially any foreign servers accessing your port 25 (SMTP)

 Setup smtp authentication or block them off with a fire wall rule (see net section)

 If it does not originate from your country or any nabour countries  ones its a safe bet to block it, just ensure not to block the new technologies like the blackberry servers that originate from countries like the UK for  Africa.

 Next up is the all powerful IPTABLES

 Its installed by default on the server

 For a really nice extensive overview visit: https://help.ubuntu.com/community/IptablesHowTo

 Firstly  How to see if you have any rules on your firewall

 iptables –list

If the very first line reads 

 ACCEPT     all  –  anywhere             anywhere

  You will have to ensure to use the –I  option this writes the rule to the front of the list

 Iptables initializes rules from the top so ACCEPT all –anywhere will result in none of your rules below it working

 To stop a specific range:

iptables -I INPUT -p tcp -m iprange –src-range 180.0.0.0-180.255.255.255 -j DROP

 to block a specific ip use:

 iptables -I  INPUT -s 180.76.5.0  -j DROP

 and to drop a smtp connecter

 iptables -I  INPUT -s  196.215.3.214 -p smtp –dport 25  -j DROP

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Categories

RSS Video Production | AD-land Corporate Video

  • The Final Product
    AD-land does small amount copies of up to 1000 copies for our clients. Designing the cover for the DVD case and the DVD itself is also within our capabilities.
  • Staff Training Videos
    Ad-land delivers high quality training videos for staff induction, training and orientation
  • Editing your Corporate Video
    The real art of editing lies in the combination of music, visuals and voice in such a way that it will keep the audience interested and sell your company.
  • Sales Presentations
    The structure of a sales presentation will mostly depend on the need of the company and the needs of their clients.
  • The key points to marketing video
    AD-land produce marketing videos that bring your message to life captivating your audience with sound and visuals of your business, striving to bring you interactive videos that get the job done.
  • Interactive Multimedia
    We create interactive multimedia for businesses; Delivering a professional level of interactivity is set by the design and application of the presentation.
  • Better Multimedia Presentations
    We are in the business of building multimedia presentations for clients. We cannot provide the content, but we can transform a presentation into something that will captivate the audience.
  • Safety Induction Video
    Ad-Land has produced this Safety Induction Video for BT Steel South Africa for their NOSA grading. The safety video with a total duration of 15 minutes and is a prime example of a Safety Induction Video.
  • News and Updates | Ad-land Productions
    Ad-land Productions, Production news, website updates, latest videos and website updates.Johannesburg South Africa. 0117952876 mail@ad-land.co.za
  • Audio Video Marketing
    Reach people through audio video marketing, a new and innovative way to show people what your company can do for them