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

What text filter can you use to display a binary file in octal numbers?

1 Answers  


What is Hard mount and soft Mount?

1 Answers   Cap Gemini,


i installed clustering packages.When i try to run it getting LUCI error...what is it..??

1 Answers  


What is LILO?

11 Answers   Cisco,


How to recover a deleted file in linux ?

5 Answers  


How to load the old kernel without rebooting server

1 Answers  


How to send automated email to a set of people at fixed time ?

3 Answers   Accenture, HP,


how can i create samba server in fedora 9.0 ? and domain/LDAP controller! clilent side is windows pc .?

0 Answers   Wipro,


why /etc/shadow file do not have any permission ?

1 Answers   IBM,


How to convert an IP address to a Domain name using Unix ?

2 Answers   Verse Innovation,


what is memory mapped / IO mapped ? Which calls used for this to access any hardware address in linux device driver ?

3 Answers   Broadcom,


What are main anti-spam features available in sendmail?

1 Answers   CSC,


Categories