LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-21-2010, 10:35 PM   #1
tr1pl3x
LQ Newbie
 
Registered: Jul 2010
Distribution: Ubuntu 10.4, Fedora 13
Posts: 25

Rep: Reputation: 16
Question block multiple port from lan going out the net


Gudday everyone, can anyone help me how to block multiples ports from my internal lan going out to the internet?, I want to prevent LAN user's in accessing this kind of ports for example port from 1500-10000.

by the way guys im making a personal firewall script, im just testing it for just curiositie's sake.

will i use the foreward chain policy?? to drop all packets, like port 1500:10000
note '#' stands for root

#iptables -A FORWARD -s 192.168.0.1/24 -p tcp --dport 1500:10000 -j DROP
#iptables -A FORWARD -s 192.168.0.1/24 -p udp --dport 1500:10000 -j DROP

linux newbie here.. tnx in advance.
 
Old 08-22-2010, 04:11 PM   #2
r0b0
Member
 
Registered: Aug 2004
Location: Europe
Posts: 608

Rep: Reputation: 50
Quote:
Originally Posted by tr1pl3x View Post
Gudday everyone, can anyone help me how to block multiples ports from my internal lan going out to the internet?, I want to prevent LAN user's in accessing this kind of ports for example port from 1500-10000.

by the way guys im making a personal firewall script, im just testing it for just curiositie's sake.

will i use the foreward chain policy??
Yes.

Quote:
Originally Posted by tr1pl3x View Post
to drop all packets, like port 1500:10000
note '#' stands for root

#iptables -A FORWARD -s 192.168.0.1/24 -p tcp --dport 1500:10000 -j DROP
#iptables -A FORWARD -s 192.168.0.1/24 -p udp --dport 1500:10000 -j DROP
This Should Just Work (TM)
 
  


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
How can I block net access for 1 user? jimk Linux - Security 10 11-26-2004 12:43 PM
Outside FTP Port 21 redirect to different port inside LAN??? hendrixx Linux - Security 5 06-05-2004 07:42 PM
how do I block mail sent to my .net address as opposed to my .com addr? BrianK Linux - General 2 12-01-2003 03:31 AM
Block RIAA on Kazza NEt kazykid22 Linux - Software 2 09-21-2003 02:14 PM
Forward port port 80 to lan web server dulaus Linux - Networking 9 10-04-2002 04:45 AM

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

All times are GMT -5. The time now is 01:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration