Re: IPTables Question

From: Bill Perkins (perk_at_iag.net)
Date: 10/30/05

  • Next message: CodeHeads: "Re: IPTables Question"
    Date: Sun, 30 Oct 2005 10:37:20 -0500
    To: For users of Fedora Core releases <fedora-list@redhat.com>
    
    

    CodeHeads wrote:
    > Hello all,
    >
    > I have a question on IPtables:
    >
    > The following is for a LAN based IP address:
    > iptables -A FORWARD -p tcp -s 192.168.1.0/24 -i eth0 -j DROP
    > iptables -A FORWARD -p udp -s 192.168.1.0/24 -i eth0 -j DROP
    >
    > Can this be used for WAN IP's?? Something like this:
    > iptables -A FORWARD -p tcp -s 68.68.68.68 -i eth0 -j DROP
    > iptables -A FORWARD -p udp -s 68.68.68.68 -i eth0 -j DROP
    >
    > And also can wild cards be used?
    > iptables -A FORWARD -p tcp -s 68.* -i eth0 -j DROP
    > iptables -A FORWARD -p udp -s 68.* -i eth0 -j DROP
    >
    > Thanks in advance,
    > ~WILL~
    >
    No reason why not. I wouldn't use wild cards, but I would use CIDR
    notation (xxx.xxx.xxx.0/24) for wild cards; e.g.
    iptables -A FORWARD -p tcp -s 68.0.0.0/8

    -- 
    -------------------------------------------------------------------------------
    "The two most common things in the	| Bill Perkins
      universe are Hydrogen and Stupidity."	| perk@iag.net
    					| programmer-at-large
    		F. Zappa		| ALL assembly languages done here.
    -------------------------------------------------------------------------------
    -- 
    fedora-list mailing list
    fedora-list@redhat.com
    To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
    

  • Next message: CodeHeads: "Re: IPTables Question"

    Relevant Pages

    • IPTables Question
      ... I have a question on IPtables: ... The following is for a LAN based IP address: ... Can this be used for WAN IP's?? ... And also can wild cards be used? ...
      (Fedora)
    • htaccess (IP)
      ... In the directive is it possible to have wild cards for the ... deny from 192.168.1.* ... The above IP would be a WAN IP not a LAN IP. ...
      (Fedora)
    • Re: IPTables Question
      ... Bill Perkins wrote: ... > CodeHeads wrote: ... > No reason why not. ... I wouldn't use wild cards, ...
      (Fedora)