LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 01-30-2004, 12:26 PM   #1
BmxFace
Member
 
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

Code:
PORT     STATE SERVICE
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, 06:55 PM   #2
pazvant
Member
 
Registered: Jul 2003
Location: Istanbul
Distribution: slack
Posts: 43

Rep: Reputation: 15
Hi,
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 0.0.0.0:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:6000 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.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

then=>
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, 12:15 PM   #3
BmxFace
Member
 
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, 12:07 PM   #4
qwijibow
Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
read

man iptables

iptables is the linux firewall.
 
  


Reply


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 10:03 PM
New installation of a VPS with Slackware: Strange filtered ports fax8 Linux - Security 5 09-10-2005 10:13 AM
How to check if packets/ports are being filtered/blocked mfeoli Linux - Networking 1 11-05-2004 06:27 AM
port closed/filtered? name_in_use450 Linux - Security 3 09-06-2004 06:52 PM
Closed ports? Greg21 Linux - Networking 4 01-15-2002 12:37 AM


All times are GMT -5. The time now is 03:29 AM.

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