How to do port forwarding for online game

Hi, everyone. I know this question asked a lot.

But I really confused.

I have access to my MikroTik with winbox and I want to open this port(UDP 32303). This port is for an online game called theHunter. I can’t play Multiplayer and mods told me you have to do port forwarding.

How can I do that? And is that necessary to set a static IP? If yes, How?

Thanks a lot,
Hossein.

Hi,

Without any knowledge about your config you could give a try to this:

/ip firewall nat
add action=src-nat chain=srcnat dst-address={your_wk_lan_ip} dst-port=32303 protocol=udp comment="UDP 32303 theHunter"



*dst-address={your_wk_lan_ip} - here put your workstation internal lan ip ( Ex.: 192.168.1.20 )

kind regards,

You will need to configure a dst-nat for inbound traffic. It is recommend that you use a static IP on your PC or at least set a DHCP reservation so your PC pulls the same IP address every time.

It should look something like:

chain=dstnat action=dst-nat in-interface=(put your WAN interface here) dst-port=(Ports Needed for Game/Service) to-addresses=(your LAN IP address here) to-ports=(Ports Needed for Game/Service) protocol=tcp

You can also use “dst-ip=WAN IP” instead of “in-interface”

EDIT
As far as setting a Static IP or a DHCP reservation…

Static IP can be configured on your PC. A reservation can be done if you go into “DHCP Server” on your Mikrotik, then select “Leases” and locate your PC. Right-click and select “make static.”

Thanks for the answer, guys. Really appreciate it.
How about a port number range?
I want to open port for World of Tanks game.
10501 & 10502 TCP and 8251 UDP.
Should I create new rule for each port?

Thanks, Revelation.
Make IP static from DHCP Server on MikroTik doesn’t kill my internet? I’m not a pro and I’m afraid to do something wrong!

Port ranges are possible, though I typically do individual ones.

No, it won’t kill your internet. On your Mikrotik, setting a reservation, “static” option, will simply tell the router to assign a specific IP address to the same device every time it “checks in.” It will also not assign it to any other device. What this means is you don’t have to go back and change the “to ip address” from time to time.

Thanks.
I change my IP to static.
I confused a little bit!
LAN IP address = My static IP address, Right?

And I try to run the command and it says “syntax error (line 1 column 6)”.

What are you talking about?

I open a new terminal and run this code with the port and my IP:

chain=dstnat action=dst-nat in-interface=(put your WAN interface here) dst-port=(Ports Needed for Game/Service) to-addresses=(your LAN IP address here) to-ports=(Ports Needed for Game/Service) protocol=tcp

But I got this error:
syntax error (line 1 column 6)

You need to type out the exact code you tried to put in.

Hi,

Let’s suppose your WAN interface is ether1 and your PC lan ip address is 192.168.1.100. I think that what Revelation wants to say is that you should issue following command into “New Terminal”
for 10501-10502 tcp

/ip firewall nat
chain=dstnat action=dst-nat in-interface=ether1 dst-port=10501-10502 to-addresses=192.168.1.100 to-ports=10501-10502 protocol=tcp

and 8251 udp

/ip firewall nat
chain=dstnat action=dst-nat in-interface=ether1 dst-port=8251 to-addresses=192.168.1.100 to-ports=8251 protocol=udp

kind regards,

Thanks for the answer.
I copy the command on this thread and change the in-interface and to-ports and to-address with mine. But I get the error.

I tried to type the command but after I write “chain” the text color change to red. And after I put “=”, background text of “=” symbol change to red. After I launch the command I get the error.

“line 1 column 6” told me that “=” after chain has an problem.

Hi,

Sorry i was not pay attention too. Both commands have a typo meaning is mising “add” in front of them.
Corrent syntax:

/ip firewall nat
add chain=dstnat action=dst-nat in-interface=ether1 dst-port=10501-10502 to-addresses=192.168.1.100 to-ports=10501-10502 protocol=tcp

and

/ip firewall nat
add chain=dstnat action=dst-nat in-interface=ether1 dst-port=8251 to-addresses=192.168.1.100 to-ports=8251 protocol=udp

kind regards,

Thank you so much everyone.

Finally I open some ports. :slight_smile:

Really appreciate it.