On Mon, 19 Feb 2018, Akshat Kakkar wrote: > I want to do DNAT depending on the interface the packet is arriving to. > > If it is arriving on eth0, I want to do DNAT to IP0 > If it is arriving on eth1, I want to do DNAT to IP1 > If it is arriving on eth2, I want to do DNAT to IP2 > .... > > Is it possible to use ipset hash:net,iface for this? How? No, that's not possible and won't be possible. > If no, then is there some other better way of doing it apart from > having N rules for N interfaces. Migrate to nftables and use it's internal set feature which supports such configurations. Best regards, Jozsef - E-mail : kadlec@xxxxxxxxxxxxxxxxx, kadlecsik.jozsef@xxxxxxxxxxxxx PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt Address : Wigner Research Centre for Physics, Hungarian Academy of Sciences H-1525 Budapest 114, POB. 49, Hungary -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html