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 |
what is the difference between NIS and DNS...?
someone already asked 'what is diff between unix & Linux' can I ask the same but more nuanced...I have 7 years app support of unix, have never seen Linux BUT need to bluff my way through in an interview i e say that I have use Linux. What are the most important things I need to know?
Who owns the data dictionary?
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 ?
Tell me command which is use for create quota database in Linux.
How to Create NIS Server And NIS Client? Explain With Example?
In how many ways linux can be installed n explain th steps involved in installation in any of the method..?
What is page-in and page-out in redhat linux?
How to recover a deleted file in linux ?
What is the difference between home directory and working directory?
Why is it suggested to disable journalism in ext4 filesystem?
What is the difference between RedHat linux and Fedora and Ubuntu?