LinuxQuestions.org
Visit Jeremy's Blog.
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 12-23-2003, 07:48 PM   #1
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,178

Rep: Reputation: 49
iptables syntax question (solved)


Here's the string I'm trying to impliment:

iptables -A INPUT -s ! 192.168.0. -j DROP

Basically trying to drop anything that is not on my local network. Unfortunately, I can't get it to respond with anything other than: "host/network `192.168.0.' not found"

What am I missing? I'm brand-new to iptables and trying to get the basics down; I figured looking up this stuff would be a good way to jumpstart me in that direction.

Thanks in advance,
-- Poetics

Last edited by Poetics; 12-23-2003 at 08:31 PM.
 
Old 12-23-2003, 08:22 PM   #2
LCD
LQ Newbie
 
Registered: Jan 2003
Location: china
Distribution: redhat 9
Posts: 6

Rep: Reputation: 0
iptables -A INPUT -s ! 192.168.0.0/24 -j DROP
 
Old 12-23-2003, 08:30 PM   #3
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,178

Original Poster
Rep: Reputation: 49
What does the /24 do? Thanks
 
Old 12-23-2003, 09:20 PM   #4
LCD
LQ Newbie
 
Registered: Jan 2003
Location: china
Distribution: redhat 9
Posts: 6

Rep: Reputation: 0
submask
255.255.255.0 --> 24
255.255.0.0 --> 16
255.0.0.0 --> 8
 
Old 12-24-2003, 03:32 PM   #5
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,178

Original Poster
Rep: Reputation: 49
Thanks; makes sense
 
  


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 syntax quick question abcampa Linux - Security 1 05-03-2005 08:03 AM
What's wrong with this iptables syntax?? registering Linux - Security 3 06-16-2004 03:54 PM
iptables syntax Ge64 Linux - Security 3 08-20-2003 10:56 PM
iptables SYNTAX jrgalan Linux - Security 2 07-31-2003 12:54 AM
ipaddress syntax - iptables arobinson74 Linux - Networking 3 03-31-2003 12:34 PM


All times are GMT -5. The time now is 08:55 PM.

Main Menu
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