[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ubuntu-users
Subject:    iptables question
From:       Noah <noah-list () enabled ! com>
Date:       2014-12-31 23:33:46
Message-ID: 54A487DA.8050602 () enabled ! com
[Download RAW message or body]

Hi there,

Merry Gnu Year!

Ive read this page and still not understanding something
https://help.ubuntu.com/community/IptablesHowTo

I am using Solution #2 for saving and installing iptables rules on 
reboot: /etc/network/if-pre-up.d and ../if-post-down.d

I am trying to figure out the best method for adding "--log-prefix 
"iptables denied: " --log-level 7" to my log line

so this line is:
-A block-and-log -m limit --limit 1/sec --limit-burst 20 -j LOG

should be this:
-A block-and-log -m limit --limit 1/sec --limit-burst 20 -j LOG 
--log-prefix "iptables denied: " --log-level 7

How do I change that upon reboot.  Here are some files to keep in mind:

root@www-virt:/etc# cat /etc/network/if-pre-up.d/iptablesload
#!/bin/sh
iptables-restore < /etc/iptables.rules
exit 0

root@www-virt:/etc# cat /etc/network/if-post-down.d/iptablessave
#!/bin/sh
iptables-save -c > /etc/iptables.rules
if [ -f /etc/iptables.downrules ]; then
    iptables-restore < /etc/iptables.downrules
fi
exit 0

Thanks





-- 
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic