Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 01-30-2004, 11:26 AM   #1
Registered: Jun 2003
Location: Minnesota
Distribution: Arch Linux :D
Posts: 105

Rep: Reputation: 15
Help getting my ports filtered/closed....

i have a bunch of ports open making it easy access for someone to get into my system...i need help closeing these...but some of them i still need access for other people...but i dont want them to run free throughout my system either

80/tcp   open  http
6000/tcp open  X11
6666/tcp open  irc-serv
6667/tcp open  irc
6668/tcp open  irc
Old 01-30-2004, 05:55 PM   #2
Registered: Jul 2003
Location: Istanbul
Distribution: slack
Posts: 43

Rep: Reputation: 15
If you want to close ports , u can either stop service or apply a basic iptables rule.For stop service u must kill the processid of port number.

like:: netstat -an | grep more
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN
tcp 0 0* LISTEN

then =>
ps -fe | grep 110
root 711 692 0 Jan30 ? 00:00:00 tcpserver -H -R -v -c100 0 110 q
root 1744 863 0 01:52 pts/1 00:00:00 grep 110

kill 711.. Is the basic way .

If your service has to be up ypu must apply a firewall rule like:

iptables -A INPUT -i eth0 -p tcp --destination-port 153 -j DROP
iptables -A INPUT -i eth0 -p tcp --destination-port 707 -j DROP
iptables -A OUTPUT -o eth0 -p tcp --destination-port 153 -j DROP
iptables -A OUTPUT -o eth0 -p tcp --destination-port 707 -j DROP
Old 02-03-2004, 11:15 AM   #3
Registered: Jun 2003
Location: Minnesota
Distribution: Arch Linux :D
Posts: 105

Original Poster
Rep: Reputation: 15
i dont quite understand this...sorry :\
Old 02-04-2004, 11:07 AM   #4
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47

man iptables

iptables is the linux firewall.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
closed vs. filtered ports servnov Linux - Security 3 10-01-2005 09:03 PM
New installation of a VPS with Slackware: Strange filtered ports fax8 Linux - Security 5 09-10-2005 09:13 AM
How to check if packets/ports are being filtered/blocked mfeoli Linux - Networking 1 11-05-2004 05:27 AM
port closed/filtered? name_in_use450 Linux - Security 3 09-06-2004 05:52 PM
Closed ports? Greg21 Linux - Networking 4 01-14-2002 11:37 PM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration