Choosing interface for outgoing traffic

Alexander Demenshin Alexander Demenshin <aldem-nf@aldem.net>
Mon, 2 Jul 2001 00:35:16 +0200


On Sun, Jul 01, 2001 at 12:50:43PM -0700, brian wrote:

> When generating traffic from a user program, I want the traffic to always
> come from the 0.30 address so that my firewall can use different
> rulesets...(webservers, etc bound to the the eth0:test1 and eth0:test2

  Use bind() system call in your application to achieve this. AFAIK, there
  is no way to select source address in netfilter code (I may be wrong,
  though, but at least there were no way before).

/Al