On Fri, Jan 25, 2013 at 7:37 AM, Rob Owens <row...@ptd.net> wrote: > On Fri, Jan 25, 2013 at 12:55:13PM +0700, Sthu Deus wrote: >>> >>> I am running Debian Wheezy, and have installed kvm. When I list my >>> iptables rules there are a set of default rules defined, and >>> forwarding is set up for my virtual network. For the life of me I can >>> not figure out where these rules are defined, and I would like to >>> make some changes that I want to be permanent. Would anyone mind >>> enlightening me as where I can find the source of those rules? >>> >>> grep -RIil iptables /etc/* returns nothing. >> >> If You want to set Your own rules, You can write it to a file where You >> want to hold it, then You can put a script w/ execution bit set in >> >> /etc/network/if-pre-up.d >> >> that will read those files. >> >> As soon as the interface comes up, Your rules will come up too (in case >> it is correct - otherwise the defaults will be used). > > I haven't had very good luck putting iptables rules in > /etc/network/if-pre-up.d while using network-manager. Last I read, > there's a bug/feature in network-manager that ignores if-pre-up.d. > Instead, I have to use the iptables-persistent package.
Out of the box, the NM dispatcher script runs scripts in "if-up.d" and not in "if-pre-up.d". To the OP: AFAIK, if you set up a nat-based VM, libvirt/qemu'll set up the rules that you're seeing. If they're in a grepable form, there'll probably be under "/usr". -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAOdo=sytwsvlni8-vta3hd9xsu3mnacb1xarxydeqexatby...@mail.gmail.com