►Problem with Gre Tunnel

keep to find it other way

The VPS needs to create a static route to 192.168.88.0/24 via the GRE tunnel.

VPS:

You added the IP address to the GRE interface in the VPS - when you need to create a route instead - let the GRE interface be unnumbered.
Route 192.168.88.0/24 to gateway interface GRE

On the Mikrotik, create a static route 172.16.149.0/24 (or 172.16.0.0/16 if this is more appropriate) with gateway=gre1

Think of the GRE interface the same as you would consider a direct cable between the two routers, except that you don’t need IP addresses on the wire in this case - if it makes you feel more comfortable, then use a /30 subnet on the GRE link e.g. 192.168.255.0/30 with .1 = the VPS and .2 = the Mikrotik, and set the next hop of your static routes to be the remote IP on the link.

thanks , but i am still confusing.
my VPS provide me an Internal ip 172.16.149.128 and if i hope the vps and my remote server(home) inside the same network in order to send file to each other.

And i think that vps Internal ip is 172.16.149.128. My home Internal ip 192.168.88.0/24.

Then configure the GRE to use 172.16.149.128/32 as the VPS end, and 192.168.88.1/32 as the Mikrotik end, and put masquerade on the GRE interface. On the Mikrotik, create a static route to 172.16.149.128/32 with gateway=gre1

i follow this http

pen the game multiplay and add the gre tunne

Leave the 192.168.1.1 as configured.

Then on the Mikrotik add this:
/ip route add dst=172.16.149.0/24 gateway=192.168.1.1

On the vps, create a static route with destination=192.168.88.0/24 and gateway (next hop) is 192.168.1.2

Then make sure that no firewall rules block the traffic at the Mikrotik or at the VPS.
Finally, you will launch the server and on the client at home, connect to 172.16.149.x as the host, and it will work.
If the game must auto-discover the server via some local broadcast, then your only option is to bridge your home network to the vps network, and that presents a whole other set of problems, so hopefully the game lets you specify the server IP.

[quote=“ZeroByte”]Leave the 192.168.1.1 as configured.

Then on the Mikrotik add this
r

Not really. There’s no reason to try to make the IP addresses appear in the middle of the tunnel, and it’s going to be a strange solution that accomplishes things in that manner.

What I’ve given you is standard, basic, regular old-school IP routing. It’s not a work-around. It’s the most basic, straightforward, normal thing you could possibly do with a router. All you’ve done is put a sign in your home network: to get to the game server, go through the tunnel, and at the game server side, you’ve put up a sign: to get to the home network, go through the tunnel. Then you just use the game server’s actual IP address to talk to it, and the routers forward the packets accordingly.

Anything else is going to be the bizarre, un-standard, stand-on-your-head way of doing things.

The only other “normal” solution would be to bridge the two networks over the tunnel, but that opens up a whole new set of problems that you don’t need to deal with, so stick with the routed solution.

Happy gaming! :smiley:

On centos vps:



On remote (home):



in my home , is it the gre tunnel ip must same as my home bridge ip (192.168.88.1/24) then they can talk?

[quote=“isamuel750”]
The problem is not the Mikrotik’s IP.
There is no IP that you can put on the Mikrotik which will magically make the VPS decide to use the Mikrotik to reach 192.168.88.x/24

The vps server needs to know that 192.168.88.x/24 lies behind the Mikrotik and not behind its default gateway.
This is called a static route.

In Linux:
route add 192.168.88.0 gateway 192.168.168.2 1

If you do this, then you can reach the vps server by IP address 192.168.168.1 from your home network.
If you want to use the venet0:2 address of 172.16.149.128, then you will need to tell the Mikrotik that this IP lies behind the GRE tunnel IP:
/ip route add 172.16.149.128/32 gateway=192.168.168.1

[quote=“ZeroByte”][quote=“isamuel750”]