How to portforward for Minecraft server (2024)

Post Reply

  • Print view
StonePlex

just joined

Topic Author

Posts: 1
Joined: Mon Mar 23, 2020 12:32 pm

How to portforward for Minecraft server

  • Quote
  • #1

Mon Mar 23, 2020 12:46 pm

Hi! I have been trying to portforward for my minecraft server but, I can't get it to work. I am a noob when it comes to these things so I need help. I have tried multiple solutions with the GUI or the terminal solutions, but they don't seem to work. Here are some of the commands I tried.

Code: Select all

ip firewall filter add chain=forward dst-address=192.168.88.142 protocol=tcp dst-port=25565 action=accept

Code: Select all

/ip firewall nat add chain=dstnat protocol=tcp dst-port=25565 in-interface=wlan1 action=dst-nat to-address=192.168.88.142 to-ports=25565 

Code: Select all

/ip firewall natadd chain=dstnat action=dst-nat dst-port=25565 protocol=tcp in-interface=wlan1 \to-address=192.168.88.142 to-ports=25565

I can't get it to work. It works localy, but thats it.
I have tried to disable the Firewall itself, but my router doesn't allow it.

Code: Select all

/ip firewall filter disable [/ip firewall filter find]

I get an error: failiure: cannot change builtin

Need help. I am open to any solution.

Top

anav

Forum Guru
How to portforward for Minecraft server (3)

Posts: 20124
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Contact anav

Re: How to portforward for Minecraft server

  • Quote
  • #2

Mon Mar 23, 2020 2:52 pm

Yes,
1. Only one firewall rule is needed for port forwarding (whether you have one server or 20 - assuming NAT of course)
2. You need one dstnat rule per server.

1. If you still have the default firewall rule in place............. it will work just fine.
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN

2. For the destination nat rule..... I am confused by wlan1 but will assume you have your INTERNET coming on on WLAN1? In any case Try
add chain=dstnat action=dst-nat protocol=tcp dst-port=25565 in-interface=WAN to-address=192.168.88.142

dont need to-ports if no change from dst-port.

Top

hahnhell

Member Candidate
How to portforward for Minecraft server (5)

Posts: 108
Joined: Sat Mar 07, 2020 11:49 pm
Location: NCR, Canada

Re: How to portforward for Minecraft server

  • Quote
  • #3

Sat Nov 21, 2020 4:03 am

I know this is a bit of a hijack, but i'm trying to do the exact same thing here... My port forwarding attempts don't seem to be working either.

I've tried in the past, have had a complete redo of my network layout, and I still can't seem to get it working.

@anav, i'm willing to take the time to learn this one and debug it completely.. The kids and their minecraft is not as important as it was to get their school work up and going!

I've done this exact same thing, trying to get to my server (192.168.15.10) same port. Nada. :(

I'm using the Mikrotik cloud service. When I go to the address, I end up seeing my router homepage (login page). But I can't seem to get 25565 to work.

Top

anav

Forum Guru
How to portforward for Minecraft server (7)

Posts: 20124
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Contact anav

Re: How to portforward for Minecraft server

  • Quote
  • #4

Sat Nov 21, 2020 5:03 am

No worries, post your config for me to look at.

Top

NevadaNV

just joined

Posts: 1
Joined: Sun Nov 22, 2020 6:47 pm

Re: How to portforward for Minecraft server

  • Quote
  • #5

Sun Nov 22, 2020 6:55 pm

No worries, post your config for me to look at.

Hi! I am experiencing exact the same problem, I've done everything and still canyouseeme.org can't see my 25565 port.
I've done

Code: Select all

/ip firewall nat add chain=dstnat protocol=tcp dst-port=25565 in-interface=sfp1 action=dst-nat to-address=192.168.88.100 to-ports=25565

and

Code: Select all

/ip firewall filter add chain=forward dst-address=192.168.88.100 protocol=tcp dst-port=25575 action=accept

I also placed them on top of other rules, opened the 25565 port on my server and called my ISP support to see whether they blocked any ports, they didnt. Still nothing. Any ideas on what else I could do?

Top

hahnhell

Member Candidate
How to portforward for Minecraft server (10)

Posts: 108
Joined: Sat Mar 07, 2020 11:49 pm
Location: NCR, Canada

Re: How to portforward for Minecraft server

  • Quote
  • #6

Wed Nov 25, 2020 10:32 pm

Sorry, I forgot to subscribe to this thread and was just waiting to see it hit my inbox... fail!

Here's my config..

You do not have the required permissions to view the files attached to this post.

Top

anav

Forum Guru
How to portforward for Minecraft server (12)

Posts: 20124
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Contact anav

Re: How to portforward for Minecraft server

  • Quote
  • #7

Thu Nov 26, 2020 12:22 am

Hmmm,
Only thing in firewall rules to clarify is that your IOT devices are not included in list internet and thus cannot access the internet.
All my IOT devices need to talk to the internet cloud of some sort???

The firewall rule for port forwarding is the default one so it looks okay but needs to be refined!
The second last rules in the forward chain could be cleaned up as its slightly redundant due to the more encompassing last rule> The idea here is to state what traffic you are allowing......
From
add action=drop chain=forward comment=\
"defconf: drop all from WAN not DSTNATed" connection-nat-state=!dstnat \
connection-state=new in-interface-list=WAN

add action=drop chain=forward comment="drop all else"

TO
add action=accept chain=forward comment="allow port forwarding" \
connection-nat-state=dstnat connection-state=new in-interface-list=WAN
add action=drop chain=forward comment="drop all else"

As far as port forwarding.......
add action=dst-nat chain=dstnat comment="Minecraft Server" dst-port=25565 \
in-interface=PPPoE_WAN protocol=tcp to-addresses=192.168.15.10

Hmmm try
in-interface-list=WAN to see if that help?

Top

anav

Forum Guru
How to portforward for Minecraft server (14)

Posts: 20124
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Contact anav

Re: How to portforward for Minecraft server

  • Quote
  • #8

Thu Nov 26, 2020 12:28 am

Just to confirm,

You are trying to reach the servers via the WANIP??
WHY............. just use the lanip of the server??

If the server is in the same LANIP of the user and trying to reach it via WANIP of the router then that is called hairpin NAT>
The easiest solution is to move the server to another vlan by itself and that will solve that for example or you need to make more rules in IP NAT.

Alternatively you can get a friend to see if they can get at the server from their WANIP, as hairpin nat or often called loopback is a local phenomena.
What functionality do you want to have??

Top

hahnhell

Member Candidate
How to portforward for Minecraft server (16)

Posts: 108
Joined: Sat Mar 07, 2020 11:49 pm
Location: NCR, Canada

Re: How to portforward for Minecraft server

  • Quote
  • #9

Thu Nov 26, 2020 1:37 am

I'm trying to port forward this so that I can connect to it from outside my network.

I am using the lanIP for the devices inside the network, that works just fine. I want to be able to invite others to it is the issue.

Top

hahnhell

Member Candidate
How to portforward for Minecraft server (18)

Posts: 108
Joined: Sat Mar 07, 2020 11:49 pm
Location: NCR, Canada

Re: How to portforward for Minecraft server

  • Quote
  • #10

Thu Nov 26, 2020 1:46 am

And, now that I changed that second to last rule, it seems to be working.

Thank you very much @anav! Have a good one.

Top

atoh

just joined

Posts: 1
Joined: Mon Jan 04, 2021 3:11 am

Re: How to portforward for Minecraft server

  • Quote
  • #11

Mon Jan 04, 2021 5:08 pm

Hi!
Im super new to this and i dont fully quite understand how to setup a minecraft server, but i would like to. Im trying to setup my router so i can play with my friends

Im not sure what i am doing wrong but this is what i have done

/ip firewall nat add chain=dstnat protocol=tcp dst.port=25565 in.interface=ether1 action=dst-nat to-address=192.168.88.35 to-ports=25565

/ip firewall filter add chain=forward dst-address=192.168.88.35 protocol=tcp dst.port=25565 in.interface=ether1 action=allow

i was following what you said in this thread @anav and im not sure what im doing wrong

Top

Post Reply

  • Print view

Who is online

Users browsing this forum: aacury, ia2130 and 39 guests

How to portforward for Minecraft server (2024)
Top Articles
Latest Posts
Article information

Author: Sen. Emmett Berge

Last Updated:

Views: 5679

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Sen. Emmett Berge

Birthday: 1993-06-17

Address: 787 Elvis Divide, Port Brice, OH 24507-6802

Phone: +9779049645255

Job: Senior Healthcare Specialist

Hobby: Cycling, Model building, Kitesurfing, Origami, Lapidary, Dance, Basketball

Introduction: My name is Sen. Emmett Berge, I am a funny, vast, charming, courageous, enthusiastic, jolly, famous person who loves writing and wants to share my knowledge and understanding with you.