LinuxQuestions.org
Review your favorite Linux distribution.
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 08-05-2004, 04:02 AM   #1
Fatz
LQ Newbie
 
Registered: Aug 2004
Location: Phil
Posts: 6

Rep: Reputation: 0
iptables rules


greetings!
just want to ask if anyone here knows how to make rules in iptables wherein all the incoming transactions... TCP / UDP (icmp, web etc) will be drop...except for 202.78.98.0 255.255.255.128 network..tnx for the help..gladly appreciated..
 
Old 08-05-2004, 06:04 AM   #2
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
iptables -A INPUT -i <external interface> -d 202.x.x.x/25 -j ACCEPT

to accept traffic for the 202.x subnet

iptables -A INPUT -i <external interface> -d ! 202.x.x.x/25 -j REJECT

to reject all traffic except for 202.x subnet.
 
  


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
IPTABLES - rules in /etc/sysconfig/iptables The_JinJ Linux - Newbie 6 11-20-2004 01:40 AM
iptables rules chrisfirestar Linux - Security 2 10-29-2003 02:30 AM
IPTables rules dkny01 Linux - Networking 6 10-23-2003 12:52 AM
iptables rules Darin Linux - Security 1 01-23-2003 04:32 PM
iptables rules hazza96 Linux - Security 3 09-09-2001 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:17 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
Open Source Consulting | Domain Registration