How to check all open ports on linux machine and block
unsed ports????????

Answers were Sorted based on User's Feedback



How to check all open ports on linux machine and block unsed ports????????..

Answer / sureshreddy

#netstat -tulp
or
#netstat -tulpn

to verfy the open ports

Is This Answer Correct ?    17 Yes 1 No

How to check all open ports on linux machine and block unsed ports????????..

Answer / raghu

netstat -t

Is This Answer Correct ?    19 Yes 11 No

How to check all open ports on linux machine and block unsed ports????????..

Answer / parthasarathy k

#nmap -v localhost for tcp
#nmap -sU localhost for udp

Is This Answer Correct ?    12 Yes 6 No

How to check all open ports on linux machine and block unsed ports????????..

Answer / manoj

netstat -t(tcp)
netstat -u(udp)or
netstat -tulpn
to verfy the open ports
to block u have to use iptable & tcp_wrappers( hosts.deny
file)

Is This Answer Correct ?    6 Yes 1 No

How to check all open ports on linux machine and block unsed ports????????..

Answer / pankaj pal

To check all the Open Ports use command
netstat - tulpn

To Block Ports for eg.22 and 80 as requested by Ashish
iptables -t filter -A INPUT -s!192.168.0.0/24(IP which you
want to allow) -p tcp -d (destination server IP) --dport
22 -j DROP

iptables -t filter -A INPUT -s!192.168.0.0/24(IP which you
want to allow) -p tcp -d (destination server IP) --dport
80 -j DROP

Is This Answer Correct ?    5 Yes 0 No

How to check all open ports on linux machine and block unsed ports????????..

Answer / boby

netstat -at | grep LISTEN

Is This Answer Correct ?    3 Yes 0 No

How to check all open ports on linux machine and block unsed ports????????..

Answer / ashish

Hi!! All
Can you give an example to block certain ports
like block 22 & 80.

Any help will be appreciated.

Ashish

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More Linux AllOther Interview Questions

i want to install XP on RHEL5 with virtualization tell me step by step configuration

1 Answers  


what restrict telnet for root itself but allow for other user

3 Answers   CA,


How to trace any process background processing?

5 Answers  


How can you see all mounted drives?

10 Answers  


how to install linux OS? pls send step by step

3 Answers  






will u plz send me the complete steps of installation of red hat linux on intel's core 2 duo processor?

1 Answers  


what are the default permissions for files and folders..?

8 Answers   IBM,


rpm package installation error in centos 6.4 [root@localhost packages6.4]# rpm -ivh nfs-utils-1.2.3-36.el6.i686.rpm warning: nfs-utils-1.2.3-36.el6.i686.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY error: Failed dependencies: keyutils >= 1.4-4 is needed by nfs-utils-1:1.2.3-36.el6.i686 libevent is needed by nfs-utils-1:1.2.3-36.el6.i686 libevent-1.4.so.2 is needed by nfs-utils-1:1.2.3-36.el6.i686 libgssglue is needed by nfs-utils-1:1.2.3-36.el6.i686 libgssglue.so.1 is needed by nfs-utils-1:1.2.3-36.el6.i686 libgssglue.so.1(libgssapi_CITI_2) is needed by nfs-utils-1:1.2.3-36.el6.i686 libnfsidmap.so.0 is needed by nfs-utils-1:1.2.3-36.el6.i686 libtirpc is needed by nfs-utils-1:1.2.3-36.el6.i686 libtirpc.so.1 is needed by nfs-utils-1:1.2.3-36.el6.i686 nfs-utils-lib >= 1.1.0-3 is needed by nfs-utils-1:1.2.3-36.el6.i686 rpcbind is needed by nfs-utils-1:1.2.3-36.el6.i686

1 Answers  


How to apply patch for multiple servers .

1 Answers   IBM,


What is the use of DNS Server? Name other servers works same as like DNS?

2 Answers  


Tell me the 5 differences between Linux and Unix?

4 Answers  


How can i recover the linux system after it was crashed by step by step process..

3 Answers   IBM,


Categories