2

I have searched a lot for a solution to this case but I couldn't find any.

So, any help would be appreciated.

I have a windows server 2012 with 1 NIC having 2 IPs bound to it 37.188.120.8 and 134.213.23.146.

These IPs are assigned private IPs 192.168.100.8 and 192.168.100.146

I have multiple VPNs configured on the Cisco ASA firewall and all of them allows traffic from both IPs.

The problem is that the .8 IP is the default IP on windows and one specific third party allows only traffic from .146 to his IP 196.232.5.228

I can't change the default IP of the windows instance in order not to break all the configurations on the VPNs.

The question is: Is there any way to force traffic going to 196.232.5.228 to have 134.213.23.146 as a source IP instead of the default IP?

While searching I encountered many posts suggesting using route command to add route but I'm not sure if this will help or not.

Any help is much appreciated.

Thank you,

  • I'll confirm that route add is the command you are looking for. – Esa Jokinen Apr 20 '15 at 20:51
  • Yap update your routing tables – jlehtinen Apr 20 '15 at 21:03
  • Thank you for the input. Can you please let me know how to add a route for an exact IP address ? All examples I see are for adding whole subnets. Thank you – Mahmoud Abd El-Fattah Apr 20 '15 at 21:04
3

The command you need is as follows:

route add 196.232.5.228 mask 255.255.255.255 192.168.x.x 192.168.100.146

Where 192.168.x.x is the default gateway on your network.
This command is adding a route specifically for 196.232.5.228 (because of the 32 bit mask), and is routing it to 192.168.x.x (your gateway) via interface 192.168.100.146.

As you didn't specify the default gateway on your network, I couldn't give you the full command, but that's the only bit you'll need to change.

| improve this answer | |
  • No problem! Just one other thing, you need to enter route -p add ..... to make it persistent across reboots. Without the -p option, the route will be lost after a reboot. – ChadH360 Apr 20 '15 at 22:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.