Re: iptables and -s, -i paramters combined

From: Adaptrx (adaptr@adaptr.xs4all.nl)
Date: 01/31/02


From: "Adaptrx" <adaptr@adaptr.xs4all.nl>
Date: Thu, 31 Jan 2002 23:12:55 +0100


"Jeff C" <jeffc@sympatico.ca> wrote in message
news:3C560F7E.8712EADF@sympatico.ca...
>
> I have a line in my iptables script;
>
> iptables -A protect -m state --state NEW -i eth0 -j ACCEPT
>
> I was thinking, to add more security to this line I could add the source
> address. Since my internal network on eth0 is all private address from
> one group I could add the -s like this;
>
> iptables -A protect -m state --state NEW -i eth0 -s 192.168.1.0/24 -j
> ACCEPT
>
> This should make sure only packets from eth0 (internal LAN) with source
> address's 192.168.1.x are allowed out.
>
> I couldn't find anything in the iptables how to or man pages saying you
> could use both the -i and -s parameters. It seems to work. Does anyone
> know about this? Or is the extra -s an unnecessary addition?

Unnecessary... that depends

Of course, only two (2) types of packets go into your own LAN interface :
1.) bad packets, i.e. errors, and
2.) spoofed packets, with a fraudulent IP address, BUT these can only come
from a machine on your own LAN, and only win NT can do that...



Relevant Pages

  • Re: iptables and -s, -i paramters combined
    ... > I have a line in my iptables script; ... Or is the extra -s an unnecessary addition? ... only two types of packets go into your own LAN interface: ...
    (comp.security.firewalls)
  • Re: WORM? ... server generating NBT-NS (port 137) traffic on WAN interface
    ... Any other suggestions about why these extraneous packets started being ... acting as a gateway then there really isn't such a thing as a LAN vs WAN ... and ONLY 1 WAN interface on the SBS2003 server. ... NICs disconnected the WAN interface continues to generate NBT/NS queries ...
    (microsoft.public.windows.server.sbs)
  • Re: martian source: any IP gurus?
    ... I suspect this is your local LAN, ... and look for these martian packets. ... Expert 0rks up the configuration of the domain controller or DHCP server so ... bad that even windoze boxes can't get a DHCP lease. ...
    (alt.os.linux.suse)
  • Re: Feasible to implement a router on a system on a chip?
    ... Or between a LAN and WAN? ... A "bridge" is a device that has two or more network ports, and which passes traffic between the ports (which may be of different types - ... no filtering or interpretation of the packets is done. ... A "router" has two or more network ports and passes packets between them based on their IP addresses, ...
    (comp.arch.embedded)
  • Re: Wired detection of rogue access points
    ... Not at all - if you use the LAN based component of the Airtight unit to send packets to all the MAC addresses visible on that wired network, then any bridging devices (eg Wireless APs) should transmit these packets into the air, and the wireless component of Airtight would pick these up and identify the presence of a wireless device connected to your LAN. ... Wired detection of rogue access points ...
    (Focus-IDS)

Loading