Snort_inline on a NoCat Auth bridge - iptables question
"Tim Porritt" <[email protected]>
| Newsgroups | gmane.network.nocat |
|---|---|
| Message-ID | <200502101756750.SM01804@xizor> |
I am trying to get snort_inline running on the same box that functions as my
nocat auth gateway (latest nocatauth-nightly, not splash). I have the
gateway running with two interfaces bridged together and it works fine. The
snort_inline doc that I have gives an example of how to use a standard
iptables rule to achieve the queuing it requires but I am lost when I comes
to where it should be modifying the nocat stuff. I have built iptables
firewalls in the past but I am confused on where it goes. I currently have
initialize.fw building and starting the bridge when the gateway starts.
Here is the example I have for working with snort_inline in a standard
firewall:
# Original Rules
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -m state --state NEW -m tcp --dport 80 -j ACCEPT
# Rules modified for snort_inline in a standard firewall
-A INPUT -m state --state ESTABLISHED,RELATED -p tcp --dport 80 -j QUEUE
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j QUEUE
# Here is a chunk of the initialize.fw that I though maybe it should go in
# Handle tagged traffic.
#
for iface in $InternalDevice; do
for net in $LocalNetwork; do
for fwmark in $classes; do
# Only forward tagged traffic per class
$fwd -i $iface -s $net -m mark --mark $fwmark -j ACCEPT
# $fwd -o $iface -d $net -m mark --mark $fwmark -j ACCEPT
# Masquerade permitted connections.
$nat -o $ExternalDevice -s $net -m mark --mark $fwmark -j MASQUERADE
done
__________________________________________
would I just modify the -j ACCEPT line to be -j QUEUE and then put a second
line with -j ACCEPT immediately afterwards?
And the same for the -j MASQUERADE line?
Any info would be greatly appreciated, Thanks
Timmay