ABHIONLINUX
Site useful for linux administration and web hosting

2011/05/12

How to install commands host, dig and nslookup in linux.


In a new linux server, when you try to run the command given below, it will be getting error.

[root@server /]# host abhionlinux.in
-bash: host: command not found

In such cases, you need to install the bind-utils package in the server.

1. ssh to the server.
2 run the command
[root@server /]# yum install bind-utils

Now host, dig and nslookup will be working fine.

2011/05/08

How to check open ports in linux


nmap -sS -O 127.0.0.1


Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2011-05-08 16:49 CEST
Interesting ports on server.abhi.com (127.0.0.1):
Not shown: 1660 closed ports
PORT     STATE SERVICE
21/tcp   open  ftp
22/tcp   open  ssh
25/tcp   open  smtp
53/tcp   open  domain
80/tcp   open  http
106/tcp  open  pop3pw
110/tcp  open  pop3
111/tcp  open  rpcbind
143/tcp  open  imap
443/tcp  open  https
465/tcp  open  smtps

Device type: general purpose
Running: Linux 2.4.X|2.5.X|2.6.X
OS details: Linux 2.5.25 - 2.6.3 
Uptime 95 days

Nmap run completed -- 1 IP address (1 host up) scanned in 2.341 seconds