Community discussions

MikroTik App
 
sinsel
just joined
Topic Author
Posts: 3
Joined: Sun Mar 26, 2023 10:48 pm

Replace IP for vpn server

Sun Mar 26, 2023 10:58 pm

Hi guys,

i have a BGP setup, which got me a list of routes of certain IPs, so that i can route them to my VPN tunnel. However, when my BGP is active my public VPN server IP (IP1) is replaced with its internal IP (IP2 192.168.30.*). So that all my routes become invalid. I got this by pinging my IP1 and disable or enable BGP. So, while BGP is not loaded I ping IP1, after BGP is loaded ping changes to IP2.
I can add an additional low value route for my IP1 to point to my ISP gateway IP, but it changes fairly often, so i should track it by hand.

Can you please advice me how can I change all requests to IP2 to be sent to IP1 explicitly?
 
wiseroute
Member
Member
Posts: 352
Joined: Sun Feb 05, 2023 11:06 am

Re: Replace IP for vpn server

Mon Mar 27, 2023 2:10 pm

hi.

hmm... i am sorry i could only guess that your layout would be like this?

internet ---> bgp/vpn ---> internal vpn network

is it correct?

ip1 is public vpn server when no bgp activated.
ip2 is private vpn server when bgp activated.

and the reason for such setup was your internet gateway changes often? was it dial up dhcp ppp internet? if that's the case, maybe your interface ip it changes often as well?

actually i don't see any problem for both bgp and vpn in the same nor different interface. the problem probably lies within your internal tunnel network subnet, are they public routable or private one?
 
sinsel
just joined
Topic Author
Posts: 3
Joined: Sun Mar 26, 2023 10:48 pm

Re: Replace IP for vpn server

Mon Mar 27, 2023 11:58 pm

Thank you for a reply. The scheme you described is correct. But I have no clue what to do with it. How can I route all requests for 192.168.30.11 to my public con server ip?
 
sinsel
just joined
Topic Author
Posts: 3
Joined: Sun Mar 26, 2023 10:48 pm

Re: Replace IP for vpn server

Tue Mar 28, 2023 2:13 pm

How to route everything to my IP1 through my ISP gateway when my VPN/BGP is active? Knowing that fact that ISP Gateway IP changes often

now i have a route: dst address-185.*.*.* (IP1), Gateway: 100.*.0.1 (my ISP gateway IP)
Everything works like a charm until my ISP Gateway IP changes.

Who is online

Users browsing this forum: No registered users and 13 guests