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 |
i want to install XP on RHEL5 with virtualization tell me step by step configuration
what restrict telnet for root itself but allow for other user
How to trace any process background processing?
How can you see all mounted drives?
how to install linux OS? pls send step by step
will u plz send me the complete steps of installation of red hat linux on intel's core 2 duo processor?
what are the default permissions for files and folders..?
rpm package installation error in centos 6.4 [root@localhost packages6.4]# rpm -ivh nfs-utils-1.2.3-36.el6.i686.rpm warning: nfs-utils-1.2.3-36.el6.i686.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY error: Failed dependencies: keyutils >= 1.4-4 is needed by nfs-utils-1:1.2.3-36.el6.i686 libevent is needed by nfs-utils-1:1.2.3-36.el6.i686 libevent-1.4.so.2 is needed by nfs-utils-1:1.2.3-36.el6.i686 libgssglue is needed by nfs-utils-1:1.2.3-36.el6.i686 libgssglue.so.1 is needed by nfs-utils-1:1.2.3-36.el6.i686 libgssglue.so.1(libgssapi_CITI_2) is needed by nfs-utils-1:1.2.3-36.el6.i686 libnfsidmap.so.0 is needed by nfs-utils-1:1.2.3-36.el6.i686 libtirpc is needed by nfs-utils-1:1.2.3-36.el6.i686 libtirpc.so.1 is needed by nfs-utils-1:1.2.3-36.el6.i686 nfs-utils-lib >= 1.1.0-3 is needed by nfs-utils-1:1.2.3-36.el6.i686 rpcbind is needed by nfs-utils-1:1.2.3-36.el6.i686
How to apply patch for multiple servers .
What is the use of DNS Server? Name other servers works same as like DNS?
Tell me the 5 differences between Linux and Unix?
How can i recover the linux system after it was crashed by step by step process..