How to check all open ports on linux machine and block
unsed ports????????
Answers were Sorted based on User's Feedback
Answer / sureshreddy
#netstat -tulp
or
#netstat -tulpn
to verfy the open ports
| Is This Answer Correct ? | 17 Yes | 1 No |
Answer / parthasarathy k
#nmap -v localhost for tcp
#nmap -sU localhost for udp
| Is This Answer Correct ? | 12 Yes | 6 No |
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 |
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 |
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 |
Who owns the data dictionary?
How to findout, if the user is local user or NIS user in the Linux (RHEL)?
How To Hide the FTP Version?
what is the difference between unix and linux...
How does the boot process[init levels] work on Linux? How is it different from Solaris?
Without Using $date -dyesterday. How I get the yesterday's date ?
i want to install XP on RHEL5 with virtualization tell me step by step configuration
I want to configure production interface and manage interface, how to configure both interfaces in Linux. please post the answers
What is the other method of installing Linux O.S other than Text, GUI mode? Why we prefer that for installation of Linux in Real time?
How to build new filesystem ? and what is irig file system?
How to ""Add"" not replace address to same network card other than the alias way.... ??????
What is the difference between ext3 and ext4?