Community discussions

MikroTik App
 
yaomacbt
newbie
Topic Author
Posts: 31
Joined: Tue Sep 10, 2019 11:53 pm

Routing to BGP in GRE over IPsec

Tue Apr 14, 2020 10:46 pm

I have a Mikrotik setting like below:

(internal subnet 192.168.10.1/24) - (My MikroTik router) - WAN public IP 1.1.1.1 ------ (ISP Gateway) --- (Internet) ---- (remote peer)

My Mikrotik has 2 interfaces, one configured to be the internal subnet gateway 192.168.10.1, the other configured to be the WAN port which connected to ISP's gateway. Between the WAN port(1.1.1.1), and a remote peer, I am running BGP routing in a GRE over IPsec tunnel. Under my internal subnet 192.168.10.0/24, the routing are good which traffic will be routed to the BGP routes.
However, I need to connected another server with an public IP 1.1.1.2 (which stay the same subnet, but just one digit off with my Mikrotik's WAN IP). I want to route traffic from this 1.1.1.2 server via the BGP in GRE over IPSec tunnel as well. How should I do that?

My initial thought is bridge 2 mikrotik ports together and assign WAN public IP1.1.1.1 to this bridge, then connect the server 1.1.1.2 to this bridge, and connect the other bridged port to ISP's gateway. However, by doing this, the trafffic gerated form 1.1.1.2 do not want to go through my Mikrotik router, and everytime it goes directly to the ISP's gateway instead.

Can anyone suggest me a plan for how to router 1.1.1.2 server traffic into this router, to utilize my BGP route?

Thanks,
Weiqi
 
yaomacbt
newbie
Topic Author
Posts: 31
Joined: Tue Sep 10, 2019 11:53 pm

Re: Routing to BGP in GRE over IPsec  [SOLVED]

Wed Apr 15, 2020 9:52 pm

Finally, found a way: NAT/ one to one IP mapping. It solved my issue perfectly.
Assgin the server a local IP, then NAT'ed the local server IP to a public IP on mikrotik, followed by exactly this link:
https://wiki.mikrotik.com/wiki/How_to_l ... Local_ones

Who is online

Users browsing this forum: No registered users and 64 guests