Iptables: Changing source address of a UDP packet


I have two vlans on my network vlan99 ( and vlan40 ( There are two devices - one in the vlan99 ( and the other one in the vlan40 ('`). Firewall rules allow bidirectional communication across those vlans. Devices talk over UDP.

The device in the vlan40 network seems picky about the source address of devices that knock its door. I.e. it refuses to accept data from devices in the vlan99. For a number of reasons I can't place both the devices on the same vlan.

I'm trying to make it work by modifying the source address of UDP packets coming out the device via the following iptables rule:

 iptables -t nat -A POSTROUTING -s -p udp -d  -j SNAT --to-source

But when I check if the rule is hit by doing:

iptables -t nat -L POSTROUTING -v -n

I got 0s:

pkts bytes target     prot opt in     out     source               destination
    0     0 SNAT       udp  --  *      *         to:

What am I doing wrong? Any suggestions/pointers are appreciated.