{"id":54012,"date":"2022-05-06T12:44:03","date_gmt":"2022-05-06T12:44:03","guid":{"rendered":"\/tutorials\/?p=54012"},"modified":"2026-03-09T19:18:35","modified_gmt":"2026-03-09T19:18:35","slug":"how-to-port-forward-a-minecraft-server","status":"publish","type":"post","link":"\/ng\/tutorials\/how-to-port-forward-a-minecraft-server","title":{"rendered":"How to port forward a Minecraft server"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><p>Port forwarding a Minecraft server requires mapping your local machine&rsquo;s IP address and the game&rsquo;s port number within your router settings. This enables other players to connect to the locally hosted game server and play in multiplayer mode.&nbsp;<\/p><p>To successfully set up a multiplayer server, follow these five steps:<\/p><ol class=\"wp-block-list\">\n<li><strong>Identify network details.<\/strong> Locate your device&rsquo;s unique local address and the router&rsquo;s gateway.<\/li>\n\n\n\n<li><strong>Adjust server settings.<\/strong> Define which port the Minecraft application will use.<\/li>\n\n\n\n<li><strong>Update firewall rules. <\/strong>Permit incoming connections through your computer&rsquo;s security system.<\/li>\n\n\n\n<li><strong>Create router rules. <\/strong>Map the game port to your internal IP address.<\/li>\n\n\n\n<li><strong>Launch and connect.<\/strong> Restart the application and share your public IP with other players to connect to the server.<\/li>\n<\/ol><p>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-find-your-ip-address-and-default-gateway\"><strong>Find your IP address and default gateway<\/strong><\/h2><p>Finding your computer&rsquo;s IP address and default gateway is the first step in forwarding your Minecraft port. This is because your router requires a precise destination to direct external game traffic to the machine where the Minecraft server is running.&nbsp;<\/p><p>An <strong>IP address, <\/strong>or specifically an <strong>IPv4 <\/strong>Address,<strong> <\/strong>is a unique numerical label assigned to your computer that enables other devices to identify it within the local network.&nbsp;<\/p><p>Without the IP address, the router cannot forward the traffic to the correct system because it can&rsquo;t distinguish your Minecraft server from smartphones or laptops that are also connected to the local network.&nbsp;<\/p><p>Meanwhile, the <strong>default gateway<\/strong> is the IP address of your router, which serves as the access point into your local network. When a user connects to your Minecraft server, it uses this address to identify the router, which then forwards the request to the corresponding IP address within its local network.&nbsp;<\/p><p>Here is how to find the IP address and default gateway on Windows. After obtaining them, we&rsquo;ll continue to set up a static IP address to ensure players can connect to your Minecraft server using the same address:<\/p><ol class=\"wp-block-list\">\n<li>Press <strong>Windows + R<\/strong> and type <strong>cmd<\/strong>. Hit <strong>Enter<\/strong>.<\/li>\n\n\n\n<li>Type this command and press <strong>Enter<\/strong>:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ipconfig<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li> Find the addresses next to <strong>IPv4 Address<\/strong> and <strong>Default Gateway<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1b3f7cb77b\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1483\" height=\"762\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/default-gateway.png\/public\" alt=\"Command prompt prints IP address and default gateway of the current machine\" class=\"wp-image-105134\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/default-gateway.png\/w=1483,fit=scale-down 1483w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/default-gateway.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/default-gateway.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/default-gateway.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/default-gateway.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1483px) 100vw, 1483px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Close the <strong>Command Prompt.<\/strong><\/li>\n\n\n\n<li>Hit <strong>Ctrl + R <\/strong>again and enter <strong>ncpa.cpl<\/strong>.<\/li>\n\n\n\n<li>Right-click your <strong>network connection<\/strong>, select <strong>Properties<\/strong>, locate <strong>Internet Protocol Version 4 (TCP\/IP)<\/strong>, and hit <strong>Properties<\/strong> again.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1b3f7ce1ce\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"454\" height=\"585\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/ethernet-properties.png\/public\" alt=\"Ethernet Properties on Windows with TCP\/IPv4 entry highlighted\" class=\"wp-image-105135\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/ethernet-properties.png\/w=454,fit=scale-down 454w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/ethernet-properties.png\/w=233,fit=scale-down 233w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/ethernet-properties.png\/w=116,fit=scale-down 116w\" sizes=\"auto, (max-width: 454px) 100vw, 454px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"7\" class=\"wp-block-list\">\n<li>Select the <strong>Use the following IP address<\/strong> option.<\/li>\n\n\n\n<li>Enter the IP address and default gateway you obtained earlier in their corresponding fields. For the subnet mask, <strong>255.255.255.0<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1b3f7d0baa\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"500\" height=\"568\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/tcp-ipv4.png\/public\" alt=\"The TCP\/IPv4 configuration menu in Windows\" class=\"wp-image-105167\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/tcp-ipv4.png\/w=500,fit=scale-down 500w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/tcp-ipv4.png\/w=264,fit=scale-down 264w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/tcp-ipv4.png\/w=132,fit=scale-down 132w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"9\" class=\"wp-block-list\">\n<li>Click <strong>Ok<\/strong> to save the changes.&nbsp;<\/li>\n<\/ol><p>Meanwhile, the steps look like this on <strong>macOS:<\/strong><\/p><ol class=\"wp-block-list\">\n<li>Open <strong>Terminal<\/strong>.<\/li>\n\n\n\n<li>Type the following command and press Enter to identify your router&rsquo;s default gateway:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">netstat -nr | grep default<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Enter the following command in the same terminal window to find your computer&rsquo;s IP address. Replace <strong>en0 <\/strong>with <strong>en1 i<\/strong>f you use Ethernet:&nbsp;<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">ipconfig getifaddr en0<\/pre><ol start=\"4\" class=\"wp-block-list\">\n<li>Go to <strong>System Settings<\/strong> &rarr; <strong>Network<\/strong>.<\/li>\n\n\n\n<li>Find the network you&rsquo;re using and click <strong>Details<\/strong>.<\/li>\n\n\n\n<li>Go to the <strong>TCP\/IP <\/strong>tab and expand the <strong>Configure IPv4 <\/strong>drop-down menu.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1b3f7d2d06\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"895\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/network-details.png\/public\" alt=\"Network TCP\/IP details shown in System Settings on macOS\" class=\"wp-image-105170\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/network-details.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/network-details.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/network-details.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/network-details.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"7\" class=\"wp-block-list\">\n<li>Select <strong>Using DHCP with manual address, <\/strong>and fill out your preferred IP address. For the router address, we recommend using <strong>0<\/strong>.<\/li>\n\n\n\n<li>Click <strong>OK<\/strong> to save the changes.<\/li>\n<\/ol><p>If you use <strong>Linux, <\/strong>the procedure is as follows. Note that since we are using Ubuntu, the commands might differ slightly depending on your distro:<\/p><ol class=\"wp-block-list\">\n<li>Open your <strong>terminal.<\/strong><\/li>\n\n\n\n<li>Run the following command to find the gateway:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">route -n | grep \"^0.0.0.0\" | cut -d ' ' -f 10<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>In the same shell, run this command to find your computer&rsquo;s IP address:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">hostname -I<\/pre><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1b3f7d4d80\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"1185\" height=\"191\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-terminal-outputs-the-system-ip-address-and-default-gateway.png\/public\" alt=\"Linux terminal outputs the IP address and default gateway of the current system\" class=\"wp-image-138684\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-terminal-outputs-the-system-ip-address-and-default-gateway.png\/w=1185,fit=scale-down 1185w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-terminal-outputs-the-system-ip-address-and-default-gateway.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-terminal-outputs-the-system-ip-address-and-default-gateway.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-terminal-outputs-the-system-ip-address-and-default-gateway.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/linux-terminal-outputs-the-system-ip-address-and-default-gateway.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1185px) 100vw, 1185px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Open your computer&rsquo;s network configuration by running the following. If you can&rsquo;t find the file, the name or location might be different:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo nano \/etc\/netplan\/01-netcfg.yaml<\/pre><ol start=\"5\" class=\"wp-block-list\">\n<li>Change the <strong>Routes <\/strong>parameter to the default gateway value obtained earlier, and <strong>Addresses<\/strong> to your preferred IP address.&nbsp;<\/li>\n\n\n\n<li>Save the changes by pressing <strong>Ctrl + X<\/strong>, <strong>Y<\/strong>, then<strong> Enter<\/strong>.&nbsp;<\/li>\n<\/ol><h2 class=\"wp-block-heading\" id=\"h-what-is-port-forwarding\"><strong>Configure the Minecraft server port<\/strong><\/h2><p>Configure the Minecraft server port to ensure it listens for incoming data on the correct channel. Depending on your Minecraft version, the port to use differs:<\/p><ul class=\"wp-block-list\">\n<li><strong>Java Edition:<\/strong> 25565 (TCP)<\/li>\n\n\n\n<li><strong>Bedrock Edition:<\/strong> 19132 (UDP) for IPv4, and 19133 (UDP) for IPv6<\/li>\n<\/ul><p>To do this, locate and <a href=\"\/ng\/tutorials\/minecraft-server-properties\">edit your Minecraft server properties file<\/a> by following these steps:<\/p><ol class=\"wp-block-list\">\n<li>Locate the <strong>server.properties <\/strong>file on your computer. This differs depending on your operating system and installation path.&nbsp;<\/li>\n\n\n\n<li>Right-click the file and open it with a text editor like <strong>Notepad<\/strong>.&nbsp;<\/li>\n\n\n\n<li>Locate the line <strong>server-port <\/strong>and ensure it matches the correct default port for your specific game version. Otherwise, change the value accordingly.<\/li>\n<\/ol><figure data-wp-context='{\"imageId\":\"69e1b3f7d7263\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"510\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/server-properties.png\/public\" alt=\"Minecraft's server properties file\" class=\"wp-image-105117\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/server-properties.png\/w=960,fit=scale-down 960w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/server-properties.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/server-properties.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/server-properties.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 960px) 100vw, 960px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><ol start=\"4\" class=\"wp-block-list\">\n<li>Hit <strong>Ctrl + S<\/strong> to save the changes.&nbsp;<\/li>\n<\/ol><p>Technically, you can change the default Minecraft port to any number between <strong>1<\/strong> and <strong>65535<\/strong>. However, it&rsquo;s not recommended as it may conflict with another network service if you are unsure whether the port is free.&nbsp;<\/p><p>Moreover, using non-default ports requires every player to manually type the port number after the IP address to connect, which makes the process more complicated.<\/p><h2 class=\"wp-block-heading\" id=\"h-allow-the-minecraft-port-through-the-firewall\"><strong>Allow the Minecraft port through the firewall<\/strong><\/h2><p>Allowing the Minecraft port through the firewall enables other players to connect to the game server running on your computer. This is crucial because your operating system&rsquo;s security software is designed to automatically drop unsolicited incoming packets to prevent unauthorized access.&nbsp;<\/p><p>Here&rsquo;s how to set up your Windows firewall to allow the Minecraft port:<\/p><ol class=\"wp-block-list\">\n<li>Open <strong>Windows Defender Firewall with Advanced Security<\/strong>.<\/li>\n<\/ol><figure data-wp-context='{\"imageId\":\"69e1b3f7d977a\"}' data-wp-interactive=\"core\/image\" class=\"wp-block-image size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"972\" height=\"911\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/windows-defender-firewall.png\/public\" alt=\"Windows Defender Firewall application is shown, a built-in Windows tool that allows users to access advanced settings of Windows Defender\" class=\"wp-image-105118\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/windows-defender-firewall.png\/w=972,fit=scale-down 972w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/windows-defender-firewall.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/windows-defender-firewall.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/windows-defender-firewall.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 972px) 100vw, 972px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><ol start=\"2\" class=\"wp-block-list\">\n<li>Select <strong>Inbound Rules<\/strong> and click <strong>New Rule<\/strong>.<\/li>\n\n\n\n<li>Choose <strong>Port<\/strong>, select <strong>TCP<\/strong>, and enter <strong>25565<\/strong>.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1b3f7db46c\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"892\" height=\"726\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/new-inbound-rule-port.png\/public\" alt=\"New Inbound Rule selection window with the Port option selected\" class=\"wp-image-105119\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/new-inbound-rule-port.png\/w=892,fit=scale-down 892w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/new-inbound-rule-port.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/new-inbound-rule-port.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2024\/03\/new-inbound-rule-port.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 892px) 100vw, 892px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"4\" class=\"wp-block-list\">\n<li>Select <strong>Allow the connection<\/strong> and name the rule, such as <strong>Minecraft TCP<\/strong>.<\/li>\n\n\n\n<li>Repeat the steps to create a separate rule for <strong>UDP<\/strong> to ensure full connectivity.<\/li>\n<\/ol><p>In<strong> macOS<\/strong>, the process is more straightforward:<\/p><ol class=\"wp-block-list\">\n<li>Navigate to <strong>System Settings<\/strong> &rarr; <strong>Network<\/strong> &rarr; <strong>Firewall<\/strong>.<\/li>\n\n\n\n<li>Toggle the <strong>Firewall<\/strong> on. You may need to enter the admin password.&nbsp;<\/li>\n\n\n\n<li>Click <strong>Options<\/strong> and then the <strong>+<\/strong> (plus) button.<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1b3f7ddc60\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-large wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"1060\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/the-firewall-rule-setup-window-on-macos.jpeg\/public\" alt=\"The firewall rule configuration menu in macOS\" class=\"wp-image-138685\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/the-firewall-rule-setup-window-on-macos.jpeg\/w=998,fit=scale-down 998w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/the-firewall-rule-setup-window-on-macos.jpeg\/w=282,fit=scale-down 282w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/the-firewall-rule-setup-window-on-macos.jpeg\/w=964,fit=scale-down 964w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/the-firewall-rule-setup-window-on-macos.jpeg\/w=141,fit=scale-down 141w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/the-firewall-rule-setup-window-on-macos.jpeg\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 998px) 100vw, 998px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol class=\"wp-block-list\">\n<li>Select your installed <strong>Java<\/strong> application, or the specific Minecraft server executable, and ensure <strong>Allow incoming connections<\/strong> is set.<\/li>\n<\/ol><p>On <strong>Linux<\/strong>, configuring the system firewall to allow ports typically uses Uncomplicated Firewall (UFW). Here are the steps:<\/p><ol class=\"wp-block-list\">\n<li>Install UFW by running this command. Since we are using Ubuntu, remember to change the package manager according to your distribution:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo apt install ufw<\/pre><ol start=\"2\" class=\"wp-block-list\">\n<li>Allow the Minecraft server port using this command:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ufw allow 25565\/tcp<\/pre><ol start=\"3\" class=\"wp-block-list\">\n<li>Enable UFW to enforce the rule:<\/li>\n<\/ol><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">sudo ufw enable<\/pre><p>If you want to learn more about this tool, check out our guide about <a href=\"\/ng\/tutorials\/how-to-configure-firewall-on-ubuntu-using-ufw\">how to configure the firewall on Ubuntu using UFW<\/a>.&nbsp;<\/p><h2 class=\"wp-block-heading\" id=\"h-set-up-port-forwarding-on-the-router\"><strong>Set up port forwarding on the router<\/strong><\/h2><p>Port forwarding on the router bypasses the Network Address Translation (NAT) firewall, which hides internal devices&rsquo; actual addresses from the internet for security reasons. By creating a forwarding rule, you explicitly authorize the router to accept external requests on a specific port and funnel them directly to your server&rsquo;s local IP address.<\/p><p>The steps to configure port forwarding depend on your router, but the general procedure remains the same. Here&rsquo;s how to do it on a <strong>D-Link<\/strong> router:<\/p><ol class=\"wp-block-list\">\n<li>Enter your <strong>Default Gateway<\/strong> IP address into a web browser and log in with your router&rsquo;s credentials. If you are unsure, contact your internet service provider.&nbsp;&nbsp;<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1b3f7df7b5\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img decoding=\"async\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"\/tutorials\/wp-content\/uploads\/sites\/2\/2022\/05\/The-first-router-page-users-usually-see-%E2%80%93-a-login-form.png\" alt=\"A login pop-up when trying to access the router page\" class=\"wp-image-54044\"><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"2\" class=\"wp-block-list\">\n<li>Find and enable the <strong>Port Forwarding <\/strong>option.<\/li>\n\n\n\n<li>Add a name for your forwarding rule.&nbsp;&nbsp;<\/li>\n\n\n\n<li>Enter the <strong>static IP address<\/strong> obtained from the first step.&nbsp;<\/li>\n\n\n\n<li>Fill out the port fields using your <strong>Minecraft server port<\/strong>.&nbsp;<\/li>\n<\/ol><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1b3f7e0f36\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"722\" height=\"364\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/Router-page-for-D-Link.png\/public\" alt=\"Internet router\/modem configuration panel for D-Link network equipment with Advanced tab selected\" class=\"wp-image-54045\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/Router-page-for-D-Link.png\/w=722,fit=scale-down 722w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/Router-page-for-D-Link.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/Router-page-for-D-Link.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 722px) 100vw, 722px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><ol start=\"6\" class=\"wp-block-list\">\n<li>Click <strong>Apply<\/strong> to save the changes.&nbsp;<\/li>\n<\/ol><p>While generally safe, opening ports to the internet creates a potential entry point for traffic. To minimize the risk, follow <a href=\"\/ng\/tutorials\/vps-security\">VPS security best practices<\/a>, which apply to both a local and remote computer.<\/p><h2 class=\"wp-block-heading\" id=\"h-restart-the-minecraft-server-and-connect\"><strong>Restart the Minecraft server and connect<\/strong><\/h2><p>Restart your Minecraft server and connect to it to finalize the setup. Since the server typically reads configuration files and binds to ports during the startup sequence, rebooting ensures the changes are applied.&nbsp;&nbsp;<\/p><div class=\"wp-block-image\"><figure data-wp-context='{\"imageId\":\"69e1b3f7e27ea\"}' data-wp-interactive=\"core\/image\" class=\"aligncenter size-full wp-lightbox-container\"><img loading=\"lazy\" decoding=\"async\" width=\"742\" height=\"312\" data-wp-class--hide=\"state.isContentHidden\" data-wp-class--show=\"state.isContentVisible\" data-wp-init=\"callbacks.setButtonStyles\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-on-async--load=\"callbacks.setButtonStyles\" data-wp-on-async-window--resize=\"callbacks.setButtonStyles\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/A-running-Minecraft-server.png\/public\" alt=\"A running Minecraft server with the \/stop command typed out\" class=\"wp-image-54047\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/A-running-Minecraft-server.png\/w=742,fit=scale-down 742w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/A-running-Minecraft-server.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2022\/05\/A-running-Minecraft-server.png\/w=150,fit=scale-down 150w\" sizes=\"auto, (max-width: 742px) 100vw, 742px\" \/><button class=\"lightbox-trigger\" type=\"button\" aria-haspopup=\"dialog\" aria-label=\"Enlarge\" data-wp-init=\"callbacks.initTriggerButton\" data-wp-on-async--click=\"actions.showLightbox\" data-wp-style--right=\"state.imageButtonRight\" data-wp-style--top=\"state.imageButtonTop\">\n\t\t\t<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"12\" height=\"12\" fill=\"none\" viewbox=\"0 0 12 12\">\n\t\t\t\t<path fill=\"#fff\" d=\"M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z\"><\/path>\n\t\t\t<\/svg>\n\t\t<\/button><\/figure><\/div><p>To do this, open your Minecraft server console and type <strong>\/stop<\/strong>. Then, search <strong>what is my ip<\/strong> on Google to find your public IP address, which other players can then use to connect to your game server with this format:<\/p><pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">185.185.185.185:25565\n<\/pre><p>Change <strong>185.185.185.185 <\/strong>with the actual IP address of your system and<strong> 25565 <\/strong>with your Minecraft server&rsquo;s port number.&nbsp;<\/p><p><div class=\"editor\">\n                    <h4 class=\"title\">Expert tip<\/h4>\n                    <p>Never share your public IP on the internet, as this can expose your physical location and make you a potential target for numerous cyber attacks.<\/p>\n                    <div class=\"d-flex mt-40\">\n                        <div class=\"author-photo\">\n                            <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/secure.gravatar.com\/avatar\/661d028daf4955890c1ba0c4fb0ee522c570445ac97bdbcf27b54c86dfc9be95?s=65&d=mm&r=g\" width=\"65\" height=\"65\" class=\"border-radius-50\" alt=\"Editor\" \/>\n                        <\/div>\n                        <div class=\"mt-auto mb-auto\">\n                            <p class=\"author-name\">Egidijus N.<\/p>\n                            <p class=\"author-position\">Head of Cyber Security<\/p>\n                        <\/div>\n                    <\/div>\n                <\/div>\n\n\n\n<\/p><h2 class=\"wp-block-heading\" id=\"h-how-to-enhance-your-minecraft-server-after-port-forwarding\"><strong>How to enhance your Minecraft server after port forwarding<\/strong><\/h2><p>After forwarding your Minecraft server&rsquo;s port, other players should be able to connect to your game server. This enables multiplayer on a self-managed server, where you have autonomy over game rules and performance, ensuring an enjoyable gaming experience.&nbsp;<\/p><p>To make multiplayer gameplay more fun, enhance the server by adding features such as land protection, an economy, or mini-games. The easiest way to do this is by installing a plugin, which you can obtain from a repository like<strong> Modrinth<\/strong>.<\/p><p>After downloading your desired extensions, check our guide on <a href=\"\/ng\/tutorials\/how-to-add-plugins-to-minecraft-server\">how to add plugins to your Minecraft server<\/a>. Have fun!<\/p><?xml encoding=\"utf-8\" ?><figure class=\"wp-block-image size-large\"><a class=\"hgr-tutorials-cta hgr-tutorials-cta-minecraft-hosting\" href=\"\/ng\/vps\/minecraft-hosting\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"300\" src=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Minecraft-hosting-banner.png\/public\" alt=\"\" class=\"wp-image-77926\" srcset=\"https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Minecraft-hosting-banner.png\/w=1024,fit=scale-down 1024w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Minecraft-hosting-banner.png\/w=300,fit=scale-down 300w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Minecraft-hosting-banner.png\/w=150,fit=scale-down 150w, https:\/\/imagedelivery.net\/LqiWLm-3MGbYHtFuUbcBtA\/wp-content\/uploads\/sites\/2\/2023\/02\/Minecraft-hosting-banner.png\/w=768,fit=scale-down 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Port forwarding a Minecraft server requires mapping your local machine&rsquo;s IP address and the game&rsquo;s port number within your router settings. This enables other players to connect to the locally hosted game server and play in multiplayer mode.&nbsp; To successfully set up a multiplayer server, follow these five steps: Find your IP address and default [&#8230;]<\/p>\n<p><a class=\"btn btn-secondary understrap-read-more-link\" href=\"\/ng\/tutorials\/how-to-port-forward-a-minecraft-server\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":279,"featured_media":144430,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"rank_math_title":"How to port forward a Minecraft server: A step-by-step guide","rank_math_description":"Learn how to port forward a Minecraft server. Kick back and enjoy playing with your friends all around the globe.","rank_math_focus_keyword":"how to port forward a minecraft server","footnotes":""},"categories":[22644],"tags":[],"class_list":["post-54012","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vps"],"hreflangs":[{"locale":"en-US","link":"https:\/\/www.hostinger.com\/tutorials\/how-to-port-forward-a-minecraft-server","default":0},{"locale":"pt-BR","link":"https:\/\/www.hostinger.com\/br\/tutoriais\/minecraft-port-forwarding","default":0},{"locale":"fr-FR","link":"https:\/\/www.hostinger.com\/fr\/tutoriels\/ouvrir-ports-serveur-minecraft","default":0},{"locale":"es-ES","link":"https:\/\/www.hostinger.com\/es\/tutoriales\/como-reenviar-puertos-de-minecraft","default":0},{"locale":"id-ID","link":"https:\/\/www.hostinger.com\/id\/tutorial\/cara-port-forward-server-minecraft","default":0},{"locale":"en-UK","link":"https:\/\/www.hostinger.com\/uk\/tutorials\/how-to-port-forward-a-minecraft-server","default":0},{"locale":"en-MY","link":"https:\/\/www.hostinger.com\/my\/tutorials\/how-to-port-forward-a-minecraft-server","default":0},{"locale":"en-PH","link":"https:\/\/www.hostinger.com\/ph\/tutorials\/how-to-port-forward-a-minecraft-server","default":0},{"locale":"es-MX","link":"https:\/\/www.hostinger.com\/mx\/tutoriales\/como-reenviar-puertos-de-minecraft","default":0},{"locale":"es-CO","link":"https:\/\/www.hostinger.com\/co\/tutoriales\/como-reenviar-puertos-de-minecraft","default":0},{"locale":"es-AR","link":"https:\/\/www.hostinger.com\/ar\/tutoriales\/como-reenviar-puertos-de-minecraft","default":0},{"locale":"pt-PT","link":"https:\/\/www.hostinger.com\/pt\/tutoriais\/minecraft-port-forwarding","default":0},{"locale":"en-IN","link":"https:\/\/www.hostinger.com\/in\/tutorials\/how-to-port-forward-a-minecraft-server","default":0},{"locale":"en-CA","link":"https:\/\/www.hostinger.com\/ca\/tutorials\/how-to-port-forward-a-minecraft-server","default":0},{"locale":"en-AU","link":"https:\/\/www.hostinger.com\/au\/tutorials\/how-to-port-forward-a-minecraft-server","default":0},{"locale":"en-NG","link":"https:\/\/www.hostinger.com\/ng\/tutorials\/how-to-port-forward-a-minecraft-server","default":0}],"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/54012","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/users\/279"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/comments?post=54012"}],"version-history":[{"count":38,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/54012\/revisions"}],"predecessor-version":[{"id":144429,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/posts\/54012\/revisions\/144429"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media\/144430"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/media?parent=54012"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/categories?post=54012"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/ng\/tutorials\/wp-json\/wp\/v2\/tags?post=54012"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}