LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (http://www.linuxquestions.org/questions/linux-security-4/)
-   -   iptables syntax question (http://www.linuxquestions.org/questions/linux-security-4/iptables-syntax-question-128525/)

Poetics 12-23-2003 07:48 PM

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

LCD 12-23-2003 08:22 PM

iptables -A INPUT -s ! 192.168.0.0/24 -j DROP

Poetics 12-23-2003 08:30 PM

What does the /24 do? Thanks :)

LCD 12-23-2003 09:20 PM

submask
255.255.255.0 --> 24
255.255.0.0 --> 16
255.0.0.0 --> 8

Poetics 12-24-2003 03:32 PM

Thanks; makes sense ;)


All times are GMT -5. The time now is 12:04 PM.