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 |
In Linux(RHEL) server have two users with same name. one is local user and second one is NIS user. if you login the server which user will login (local or NIS)
what is the difference between unix and linux...
How to load the old kernel without rebooting server
what is the difference between NIS and DNS...?
i want some basic level enterview questions can any one can help me in this
How to sort a file of size 2N bytes, if I have N bytes of memory?
what are the default permissions for files and folders..?
This question is belong to linux support. "one of my customer told to me, my application is getting slow response". how to resolve the issue. what are the steps you will follow to resolve the issue.
how u use the iptable firewall to restrict ssh,telnet,ftp
My root password has been changed, how can i enter into the system without root password?
why /etc/shadow file do not have any permission ?
What text filter can you use to display a binary file in octal numbers?