feature :mark, "Set the netfilter mark value associated with the packet"
feature :tcp_flags, "The ability to match on particular TCP flag settings"
feature :pkttype, "Match a packet type"
+ feature :socket, "Match open sockets"
# provider specific features
feature :iptables, "The provider provides iptables features."
newvalues(:unicast, :broadcast, :multicast)
end
+ newproperty(:socket, :required_features => :socket) do
+ desc <<-EOS
+ If true, matches if an open socket can be found by doing a coket lookup
+ on the packet.
+ EOS
+
+ newvalues(:true, :false)
+ end
+
newparam(:line) do
desc <<-EOS
Read-only property for caching the rule line.
:chain => 'PREROUTING',
:socket => true,
},
- :args => ['-t', :mangle, '-m', 'socket', '-j', 'ACCEPT'],
+ :args => ['-t', :mangle, '-p', :tcp, '-m', 'socket', '-m', 'comment', '--comment', '050 socket option', '-j', 'ACCEPT'],
},
}