4

After 20 pages of SO results about Mikrotik and some more google results, I'm come here, down on my knees to request some enlightment.

I have a network with static IP and some public IP (248 mask).

So far I've configured the network to use one of those public IP and use it for 2 subnets (192.168.85.X and 192.168.5.X) wich are isolated from each other and both can access internet.

What I'm trying to achieve is to add a second WAN ip to the router, and route traffic to a specific server to use that IP.

What i mean is:

  • Any PC from 192.168.85.X should use WAN IP1 and use internet with it.
  • Any PC from 192.168.85.X trying to access www.facebook.com should use WAN IP2 to browse and navigate to that website (while all the rest of the traffic goes through WAN IP1).

The device that gives me the WAN link only has 1 "out" port, so there is no way to put 2 cables from the "modem" to the Mikrotik, right now there is 1 cable going from the modem to the Mikrotik device. I've seen some forum post where the first part can be solved by just connecting 2 cables and then assign different IP for each interface.

As you may notice, I'm really raw in networking and routing, so any GUI/Winbox instruction is appreciated, but CLI commands would be just fine.

LordNeo
  • 1,177
  • 1
  • 8
  • 20
  • Dear fellow stranger, please complement your downvote with some constructive comment. Even "you should google for X keyword" is welcome. I may be looking into the wrong keywords (2 WAN IP, Mikrotik, route specific traffic, 2 WAN 1 PORT). – LordNeo Mar 13 '17 at 21:54
  • 1
    I thiink it is downvoted because this question clearly belong to a different stack-exchange site: https://serverfault.com/ or probably (but less likely) https://superuser.com/ – SergGr Mar 17 '17 at 15:34

1 Answers1

1

This info is for reference for anyone who may want to do this in the future:

1.- If you assing the IP to the WAN interface using the same notation X.X.X.X/29, the router will know that you want to use all the IP but set the default route to use the given IP as the prefered. This can be looked up in IP > Routes.

2.- If you want to use different IP for different traffic, you have to a) Mark that traffic and b) Force that traffic to go out by an specific IP. You do this in IP > Firewall > Mangle to mark the traffic and IP > Routes to add the new route for that traffic. There are contradictory info about if you need or not to add NAT (IP > Firewall > NAT) rules for the traffic and i'm really lost about it (it doesn't work with or without, but sometimes does work).

This is all i can contribute to this, i'll keep trying to find and answer in serverfault as @SergGr suggested.

LordNeo
  • 1,177
  • 1
  • 8
  • 20