propellor-5.10.1: property-based host configuration management in haskell

Maintainer | Arnaud Bailly <arnaud.oqube@gmail.com>
Safe Haskell | None
Language | Haskell98

Propellor.Property.Firewall

Description

Properties for configuring firewall (iptables) rules

# Documentation

rule :: Chain -> Table -> Target -> Rules -> Property Linux Source #

installed :: Property DebianLike Source #

data Chain Source #

Constructors

INPUT |
OUTPUT |
FORWARD |
PREROUTING |
POSTROUTING |
ChainCustom String |

Instances

Eq Chain Source # |
Instance details Defined in Propellor.Property.Firewall Methods (==) :: Chain -> Chain -> Bool (/=) :: Chain -> Chain -> Bool
Show Chain Source # |
Instance details Defined in Propellor.Property.Firewall Methods showsPrec :: Int -> Chain -> ShowS show :: Chain -> String showList :: [Chain] -> ShowS
ConfigurableValue Chain Source # |
Instance details Defined in Propellor.Property.Firewall Methods val :: Chain -> String Source #

data Table Source #

Constructors

Filter |
Nat |
Mangle |
Raw |
Security |

Instances

Eq Table Source # |
Instance details Defined in Propellor.Property.Firewall Methods (==) :: Table -> Table -> Bool (/=) :: Table -> Table -> Bool
Show Table Source # |
Instance details Defined in Propellor.Property.Firewall Methods showsPrec :: Int -> Table -> ShowS show :: Table -> String showList :: [Table] -> ShowS
ConfigurableValue Table Source # |
Instance details Defined in Propellor.Property.Firewall Methods val :: Table -> String Source #

data Target Source #

Constructors

ACCEPT |
REJECT |
DROP |
LOG |
TargetCustom String |

Instances

Eq Target Source # |
Instance details Defined in Propellor.Property.Firewall Methods (==) :: Target -> Target -> Bool (/=) :: Target -> Target -> Bool
Show Target Source # |
Instance details Defined in Propellor.Property.Firewall Methods showsPrec :: Int -> Target -> ShowS show :: Target -> String showList :: [Target] -> ShowS
ConfigurableValue Target Source # |
Instance details Defined in Propellor.Property.Firewall Methods val :: Target -> String Source #

data Proto Source #

Constructors

TCP |
UDP |
ICMP |

Instances

Eq Proto Source # |
Instance details Defined in Propellor.Property.Firewall Methods (==) :: Proto -> Proto -> Bool (/=) :: Proto -> Proto -> Bool
Show Proto Source # |
Instance details Defined in Propellor.Property.Firewall Methods showsPrec :: Int -> Proto -> ShowS show :: Proto -> String showList :: [Proto] -> ShowS

data Rules Source #

Constructors

Everything |
Proto Proto | There is actually some order dependency between proto and port so this should be a specific data type with proto + ports
DPort Port |
DPortRange (Port, Port) |
InIFace Interface |
OutIFace Interface |
Ctstate [ConnectionState] |
ICMPType ICMPTypeMatch |
RateLimit Frequency |
TCPFlags TCPFlagMask TCPFlagComp |
TCPSyn |
GroupOwner Group |
Source [IPWithMask] |
Destination [IPWithMask] |
NotDestination [IPWithMask] |
NatDestination IPAddr (Maybe Port) |
Rules :- Rules infixl 0 | Combine two rules

Instances

Eq Rules Source # |
Instance details Defined in Propellor.Property.Firewall Methods (==) :: Rules -> Rules -> Bool (/=) :: Rules -> Rules -> Bool
Show Rules Source # |
Instance details Defined in Propellor.Property.Firewall Methods showsPrec :: Int -> Rules -> ShowS show :: Rules -> String showList :: [Rules] -> ShowS
Semigroup Rules Source # |
Instance details Defined in Propellor.Property.Firewall Methods (<>) :: Rules -> Rules -> Rules # sconcat :: NonEmpty Rules -> Rules stimes :: Integral b => b -> Rules -> Rules
Monoid Rules Source # |
Instance details Defined in Propellor.Property.Firewall Methods mempty :: Rules # mappend :: Rules -> Rules -> Rules # mconcat :: [Rules] -> Rules #

data ConnectionState Source #

Constructors

ESTABLISHED |
RELATED |
NEW |
INVALID |

Instances

Eq ConnectionState Source # |
Instance details Defined in Propellor.Property.Firewall Methods (==) :: ConnectionState -> ConnectionState -> Bool (/=) :: ConnectionState -> ConnectionState -> Bool
Show ConnectionState Source # |
Instance details Defined in Propellor.Property.Firewall Methods showsPrec :: Int -> ConnectionState -> ShowS show :: ConnectionState -> String showList :: [ConnectionState] -> ShowS

data ICMPTypeMatch Source #

Constructors

ICMPTypeName String |
ICMPTypeCode Int |

Instances

Eq ICMPTypeMatch Source # |
Instance details Defined in Propellor.Property.Firewall Methods (==) :: ICMPTypeMatch -> ICMPTypeMatch -> Bool (/=) :: ICMPTypeMatch -> ICMPTypeMatch -> Bool
Show ICMPTypeMatch Source # |
Instance details Defined in Propellor.Property.Firewall Methods showsPrec :: Int -> ICMPTypeMatch -> ShowS show :: ICMPTypeMatch -> String showList :: [ICMPTypeMatch] -> ShowS
ConfigurableValue ICMPTypeMatch Source # |
Instance details Defined in Propellor.Property.Firewall Methods val :: ICMPTypeMatch -> String Source #

data TCPFlag Source #

Constructors

SYN |
ACK |
FIN |
RST |
URG |
PSH |
ALL |
NONE |

Instances

Eq TCPFlag Source # |
Instance details Defined in Propellor.Property.Firewall Methods (==) :: TCPFlag -> TCPFlag -> Bool (/=) :: TCPFlag -> TCPFlag -> Bool
Show TCPFlag Source # |
Instance details Defined in Propellor.Property.Firewall Methods showsPrec :: Int -> TCPFlag -> ShowS show :: TCPFlag -> String showList :: [TCPFlag] -> ShowS

data Frequency Source #

Constructors

NumBySecond Int |

Instances

Eq Frequency Source # |
Instance details Defined in Propellor.Property.Firewall Methods (==) :: Frequency -> Frequency -> Bool (/=) :: Frequency -> Frequency -> Bool
Show Frequency Source # |
Instance details Defined in Propellor.Property.Firewall Methods showsPrec :: Int -> Frequency -> ShowS show :: Frequency -> String showList :: [Frequency] -> ShowS
ConfigurableValue Frequency Source # |
Instance details Defined in Propellor.Property.Firewall Methods val :: Frequency -> String Source #

data IPWithMask Source #

Constructors

IPWithNoMask IPAddr |
IPWithIPMask IPAddr IPAddr |
IPWithNumMask IPAddr Int |

Instances

Eq IPWithMask Source # |
Instance details Defined in Propellor.Property.Firewall Methods (==) :: IPWithMask -> IPWithMask -> Bool (/=) :: IPWithMask -> IPWithMask -> Bool
Show IPWithMask Source # |
Instance details Defined in Propellor.Property.Firewall Methods showsPrec :: Int -> IPWithMask -> ShowS show :: IPWithMask -> String showList :: [IPWithMask] -> ShowS
ConfigurableValue IPWithMask Source # |
Instance details Defined in Propellor.Property.Firewall Methods val :: IPWithMask -> String Source #