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

How do display error messages instantly when command fails?

4 Answers  


User unable to login in server then how can u troubleshooting it? Example: server at Bangalore. in that server two users try to login in server. 1st user able to login. but second user unable to login so how can troubleshoot it ?

5 Answers   Oracle,


what is kernel panic error ? how will you fix it if you have face it after rebooting without the the help of rescue disk ?

2 Answers   Oracle,


what are acl permissions..? what is automation of jobs..?

5 Answers   IBM, TCS,


expalin the process of kickstart installation?

1 Answers   HCL, IBM,






how do i check which package has installed some command suppose ls , mkdir or whatever ???

8 Answers  


How to build new filesystem ? and what is irig file system?

3 Answers  


What is the difference between home directory and working directory?

10 Answers   Accenture, Flexi,


What is the difference between Telnet and SSH?

17 Answers   Bayer, KTree,


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

7 Answers   Tech Mahindra,


plz mention some interesting problems you faced and how you solved it?

0 Answers  


Friends, I don't have enough free space in root directory. but in home directory I have 40gb free. So I can not install anything in root directory (which occupies more space) Please suggest me If there is any possibility to increase the root directory size by minimising the home directory's.

3 Answers  


Categories