Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Virtual private networks
»
Using WireGuard with VPS for game server
« previous
next »
Print
Pages: [
1
]
Author
Topic: Using WireGuard with VPS for game server (Read 230 times)
OmegaWaffle
Newbie
Posts: 1
Karma: 0
Using WireGuard with VPS for game server
«
on:
November 05, 2024, 02:54:55 am »
Hi All, I'm pretty new to this so any help is appreciated.
I live in an apartment with CGNAT that I can't change, hence the need for this. I currently have a game server behind my opnsense box I would like to open to the internet, along with potentially some web servers in the future. I have a VPS with a public IP I'm using with a WireGuard connection to my opnsense box. I've managed to get it so that my game server can access the internet via the VPS, but I cannot get anything to get to the game server from the internet.
I'm not really sure how to access WireGuard config files from opnsense cli, so hopefully these screenshots will do!
Any help is much appreciated!
Logged
Gautier
Newbie
Posts: 17
Karma: 0
Re: Using WireGuard with VPS for game server
«
Reply #1 on:
November 08, 2024, 06:07:17 am »
I have quite similar problem.
I am connected to another opnsene and I would like to reach internet via opnsense -> WG -> opnsense -> internet.
I can connect to remote LAN but impossible to go outside.
Logged
opnusrrr
Newbie
Posts: 1
Karma: 0
Re: Using WireGuard with VPS for game server
«
Reply #2 on:
November 09, 2024, 07:16:51 pm »
In image 1 I see duplicate post up's, remove one just to keep things clean.
Your issue is likely NAT and routing tables. On your VPS you have to:
Add a route via the wgX interface where X is the number to your home LAN like this:
route add 192.168.1.0/24 dev wgX
Then add nat masquerade to your wgX interface both ways. Use MTR, see if you can ping your game server on the vps now.
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Virtual private networks
»
Using WireGuard with VPS for game server