LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-17-2003, 10:53 PM   #1
CleonII
Member
 
Registered: May 2003
Location: Buenos Aires, Argentina
Distribution: Debian
Posts: 61

Rep: Reputation: 15
port restriction


Hello, im new in the linux world, and i want to know how to filtrate trafic for the tcp ports. if posible in the text mode, and in the x mode. thanx for advanced.

see ya!!
 
Old 05-17-2003, 11:49 PM   #2
dejan_j
Member
 
Registered: May 2003
Location: Sydney
Distribution: RedHat
Posts: 111

Rep: Reputation: 15
in the firewall config u can block ports etc...
u can edit it in xmode and console..
hope that helps ya even if not in gr8 detail...
 
Old 05-18-2003, 02:12 AM   #3
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
a good way is also to use iptables. Here is an example on how to block access to port 6000 (the X11 port)

#iptables -A INPUT -p tcp --dport 6000 -j REJECT
#iptables -A INPUT -p udp --dport 6000 -j REJECT

REJECT will send back an icmp message, the default is port unreachable i think, if you exchange REJECT with DROP then they wont get anything back and it will seem as if the computer isnt up at all, atleast based on trying to connect to that port. REJECT is a way of saying "hey bug off".

There are many more things you can do with iptables and i suggest that anyone wanting to secure their machine learn iptables.

also, iptables is for the text mode. you can even do a script file and have it run everytime the computer starts (there is no iptables.conf or anything like that....if there is, i havent found it yet). I put mind in a file called firewall.sh, and i added a line to rc.local..

sh /root/firewall.sh

and my firewall rules get set everytime the machine reboots.

Last edited by Robert0380; 05-18-2003 at 02:15 AM.
 
Old 05-18-2003, 05:43 PM   #4
CleonII
Member
 
Registered: May 2003
Location: Buenos Aires, Argentina
Distribution: Debian
Posts: 61

Original Poster
Rep: Reputation: 15
thanx!
i love ip tables
 
Old 05-18-2003, 06:43 PM   #5
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
yea me too, it only takes about a day or two to really get good at iptables...im kinda hooked on em.
 
  


Reply



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
problem in restriction alvi2 Linux - Networking 1 07-13-2005 09:21 AM
website restriction jonfa Linux - Networking 1 05-31-2005 09:33 PM
port 80 restriction and acess in same script for different IP markiv_21 Linux - Networking 1 09-29-2004 02:35 AM
FTP Restriction Jason_25 Linux - Networking 2 12-02-2001 04:14 AM
ip restriction ggramajo Linux - Networking 0 11-30-2001 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:41 PM.

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
Open Source Consulting | Domain Registration