Cannot send out packets with spoofed source address
I've just written a C program to send an UDP packet out to some other computers with the source IP of my choice (not necessarily the IP of my NIC).
I think the program works fine as I tried tcpdump from local host and see all the created packets in the NIC. However, they do not appear on the machine where the packets should be sent, as I used tcpdump there and did not capture anything.
The fact was that, if I use the source IP of the same subnet with my NIC, then the packets would appear in the remote machine, otherwise they disappear. So I suppose my local machine must be preventing packets to be sent out with spoofed source IP somehow. Tried to turn off iptables, SELinux as well as to change various options from /proc/sys/net/ipv4 but didn't get any further info, no log, no error messages, etc.
Can any one give a hint. I'm using Fedora 188.8.131.52-91.fc7.
Thanks a lot for reading.