Hello Florian,
As you may have noticed, none of the generators (cisco, juniper, etc) have interface specific arguments. Generally, a filter is built then applied by an admin to the appropriate router interface.
With iptables there is no way to apply a given filter to a single interface (at least not without using -i/-o argument on each iptables rule). As such, a generated iptables filter will apply to "all interfaces" on the host.
However, there are ways to achieve what you want to do.
If, for example, the host is
10.1.1.1/32 and the VMs are all in
192.168.1.0/24 you could simply craft a policy rule at the top of you INPUT and OUTPUT filters such as:
term allow-to-vms {
action:: accept
}
...rest of rules...
For the OUTPUT, simply duplicate this rule but replace 'destination-*' with 'source-*'. This will allow all traffic to and from the VMs, while still protecting the host. Later rules can permit specific traffic to the host itself (such as ssh).
The policy language also has an option to deal with currently unsupported features. This command is called "verbatim", and it will inject any specified text into the output policy verbatim (without modification or interpretation.) So, for example, if you want the iptables policy to apply to all interfaces except for ETH3 where you want to just pass all traffic, you could place the following rule first in your policy.
term allow-all-inbound-for-eth3 {
verbatim:: iptables "-A INPUT -i eth3 -j ACCEPT"
}
...rest of rules...
Hopefully, this will help. Please let us know if this works for you.
I have a todo on my development list to add interface specific options to rules which would make this much easier. Hopefully, I'll get this done shortly.
--
Tony