Anyone know how to choose which IP a program sends data out on?

Soldato
Joined
21 Oct 2002
Posts
3,008
Location
At home of course :p
This is an interesting one - I have a machine with multiple IP addresses on it's one network card

i.e the machine has one physical NIC, however has multiple IP's running on that nic (for example 192.168.1.15, 10.0.0.15, 192.168.55.15)

Now many programs allow you to "bind" to a certain IP for incomming traffic(for example you can tell IIS to listen on 10.0.0.15 only and not on 192.168.55.15 or 192.168.1.15).

However, I would like to know how to bind to an IP for OUTGOING traffic. This is because all traffic is going out via 192.168.1.15 and I want one specific program to go out via 10.0.0.15.

Any ideas? I would probably be doing this with the SMTP module in IIS.
 
What's your network configuration? Are you connected directly to three different networks via the same interface (801.11q)? Traffic going out via 192.168.1.0/24 indicates that your default route gateway is on that network. if you want traffic to go out through a different network, you need to set the priority of the gateway on that network higher than that of any other gateways you have configured.
 
growse said:
What's your network configuration? Are you connected directly to three different networks via the same interface (801.11q)? Traffic going out via 192.168.1.0/24 indicates that your default route gateway is on that network. if you want traffic to go out through a different network, you need to set the priority of the gateway on that network higher than that of any other gateways you have configured.

Ok, My network configuration is actually as follows;

Computer IP is 192.168.5.40.

I also have the IP's 192.168.5.50 - 192.168.5.54 so I have 6 in total.

These are 1 to 1 natted on the firewall (so 192.168.5.40 becomes 80.x.x.40 and 192.168.5.50 becomes 80.x.x.50 and so on.

All IP's use the same default gateway, however when I send an email, it sees the 'sender' as 192.168.5.40 (and therefore 80.x.x.50) and I actually want it to see the sender as one of my other IP's.
 
Back
Top Bottom