Hi,
After checking quite a few articles found here and on some other websites, it's still not clear for me how one can add custom IPTables rules for each VM.
Checking the current host with just one VM at the moment I can see:
With that being said, how can one add rules per VM? For example, I would like to add:
For this one VM only and add different rules for other VM's.
Please advise, thanks.
After checking quite a few articles found here and on some other websites, it's still not clear for me how one can add custom IPTables rules for each VM.
Checking the current host with just one VM at the moment I can see:
Bash:
-A tap100i0-IN -p udp -m udp --sport 67 --dport 68 -j ACCEPT
-A tap100i0-IN -p tcp -m tcp --dport 3389 -j ACCEPT
-A tap100i0-IN -j PVEFW-Drop
-A tap100i0-IN -m limit --limit 1/sec -j NFLOG --nflog-prefix ":100:2:tap100i0-IN: policy DROP: "
-A tap100i0-IN -j DROP
-A tap100i0-IN -m comment --comment "PVESIG:X9me+QsGh3gkShtIhRe+kX6u6C8"
-A tap100i0-OUT -p udp -m udp --sport 68 --dport 67 -g PVEFW-SET-ACCEPT-MARK
-A tap100i0-OUT -m mac ! --mac-source 02:00:00:b8:c0:61 -j DROP
-A tap100i0-OUT -m set ! --match-set PVEFW-100-ipfilter-net0-v4 src -j DROP
-A tap100i0-OUT -j MARK --set-xmark 0x0/0x80000000
-A tap100i0-OUT -g PVEFW-SET-ACCEPT-MARK
-A tap100i0-OUT -m comment --comment "PVESIG:B7SW/N0NBq1SWwxVvMqCv/VauJA"
With that being said, how can one add rules per VM? For example, I would like to add:
C:
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
For this one VM only and add different rules for other VM's.
Please advise, thanks.