Will this rules make kernel to see the same packet at least twice?
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
Found the stuff in a forgotten config file. A remark about option "-d 0/0" was also there, did this option makes sense when certain log targets are used in iptables - to avoid incorrect traffic calculation?
No, packets will not be seen twice. Only one of those two
iptables
rules will ever match a given packet, since a packet cannot exit the system by two different network interfaces at the same time. The routing algorithm always selects (at most) one output interface.-o
specifies that a particular packet is to be tested for its interface, it does not specify that a packet is to leave by that interface. (The latter would be routing and is controlled byip route
.)