AutoPortForward
I would like to thank the makers of Cling for their java UPNP library. AutoPortForward uses cling
Introduction: AutoPortForward automaticlly forwards the port that is specified in the server.properties. The gateway device must support UPNP.
How this plugin works: AutoPortForward discovers gateway devices (ex: routers) and attempts to forward the port specified on a one of the devices. AutoPortForward will remove the port forward on disable, and add it again on enable. This is possible by sending a UPNP TCP request to forward a port to the gateway device, if it has UPNP, it will accept this request and forward the port specified in the server.properties. It also tells you your external ip.
"But that's not possible, you NEED to port forward": As I stated above, this is very possible. See here It discovers gateway devices (routers, bridges, modems) and sends a UPNP TCP request to forward the port specified in the server.properties to the gateway device.
What versions of CraftBukkit / Bukkit are supported: AutoPortForward will work with almost if not all versions of CraftBukkit and Bukkit, as long as the onEnable and onDisable are the same.
Configuration: AutoPortForward uses the port in the server.properties (server-port) - The default is 25565.
WARNING: AutoPortForward will remove port mappings that use TCP on the port the server will be running off of, so if you have a web server running on port 80, and a minecraft server on port 80 (Which you shouldn't do) it will delete the web server port mapping and add the minecraft server.
Unfortunately this plugin hasn't been updated in a while, isn't easy to use, and it doesn't work for everybody. That's why I made an alternative called UPnP: http://dev.bukkit.org/server-mods/upnp/
Hey, I got this error on start up which prevented the port from being forwarded. I am using BukkitGui 1.2.2.229 with the plugins VoxelSniper, WorldEdit, MagicCarpet and SpawnerAdjuster on CraftBukkit version 2377.
11:47:45 AM [SEVERE] [AutoPortForward] Exception while forwarding port:
11:47:45 AM [SEVERE] net.sbbi.upnp.messages.UPNPResponseException: Detailed error code :714, Detailed error description : NoSuchEntryInArray
11:47:45 AM [SEVERE] at net.sbbi.upnp.messages.ActionMessageResponseParser.startElement(ActionMessageResponseParser.java:145)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
11:47:45 AM [SEVERE] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
11:47:45 AM [SEVERE] at net.sbbi.upnp.messages.ActionMessage.service(ActionMessage.java:172)
11:47:45 AM [SEVERE] at net.sbbi.upnp.impls.InternetGatewayDevice.addPortMapping(InternetGatewayDevice.java:388)
11:47:45 AM [SEVERE] at com.jca2323.AutoPortForward.AutoPortForwardMain.forwardPort(AutoPortForwardMain.java:103)
11:47:45 AM [SEVERE] at com.jca2323.AutoPortForward.AutoPortForwardMain.onEnable(AutoPortForwardMain.java:65)
11:47:45 AM [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217)
11:47:45 AM [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:374)
11:47:45 AM [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
11:47:45 AM [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:266)
11:47:45 AM [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:248)
11:47:45 AM [SEVERE] at net.minecraft.server.MinecraftServer.i(MinecraftServer.java:297)
11:47:45 AM [SEVERE] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:276)
11:47:45 AM [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:226)
11:47:45 AM [SEVERE] at net.minecraft.server.DedicatedServer.init(DedicatedServer.java:140)
11:47:45 AM [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:377)
11:47:45 AM [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:539)
So you don't need a static ip for this plugin?
I have a question. What do u recommend using this on windows or mac. Also I have a server that I manually port forwarded it is 50.53.5.150:25565 so Would it be ok to run that on a different computer and just change the port #? Ps: I love that you have a dierect download from dropbox. I love dropbox.
@XcreeperzombieX
Server already running on that port, or cannot gain control over the port: This has nothing to do with my plugin, rather than your configuration file. set server-ip in the server.properties to nothing. (server-ip= ) and that should fix your problem
Everytime I try to run it, it tells me this:
2012-07-11 16:20:15 [INFO] Starting minecraft server version 1.2.3 2012-07-11 16:20:15 [INFO] Loading properties 2012-07-11 16:20:15 [INFO] Starting Minecraft server on *my router ip*:25565 2012-07-11 16:20:15 [WARNING] FAILED TO BIND TO PORT! 2012-07-11 16:20:15 [WARNING] The exception was: java.net.BindException: Cannot assign requested address: JVM_Bind 2012-07-11 16:20:15 [WARNING] Perhaps a server is already running on that port?
It won't port forward me :(
@Jonathanballz
Does your device support UPNP? If it does is it enabled?
this sounds nice and all but keep failing every time and can you make it compatible with 1.2.5
here is the error
2012-07-11 15:31:54 [INFO] [AutoPortForward] Enabling AutoPortForward v4.0 2012-07-11 15:31:54 [INFO] [AutoPortForward] AutoPortForward by jca2323 version 1.4 loaded 2012-07-11 15:31:54 [INFO] [AutoPortForward] Forwarding port: 25565 2012-07-11 15:32:00 [WARNING] [AutoPortForward] Failed to find a device, disabli ng. 2012-07-11 15:32:00 [INFO] [AutoPortForward] Disabling AutoPortForward v4.0
OMG YES! About time someone made this haha Now the noobs can stop complaining! Will try it out. You try can make a list of moderms/routors that work with this plugin.
I really want to use this plugin but i keep getting this error:
http://pastebin.com/UDrwUAYF
Please help :(
@Royalgamer06
What brand of router do you have and model?
@wilsondc15
I could add the the external ip feature to the plugin. Also, for now use whatsmyip.org
I want to download this plugin because it sounds perfect but after it sets up will it tell me the external ip I need to give people to get on, and also, will the ip it sets up stay the same or will it ever change? Is it dynamic or static?
I get this error every f*ckin time I try it. "Cant bind to port 25565, maybe server is running allready on that port. I dont have running 2 servers and my config is good. There is in my ip my ip and port is 25565
Whats wrong? Best plugin if I get this working :)
Please help me :/
----
Edit:
I changed ip to nothing and It worked 1-2 seconds after errors..
Error:
13:22:51 [INFO] [AutoPortForward] Enabling AutoPortForward v4.0
13:22:51 [INFO] [AutoPortForward] AutoPortForward by jca2323 version 1.4 loaded
13:22:51 [INFO] [AutoPortForward] Forwarding port: 25565
13:22:57 [INFO] [AutoPortForward] Attempting to use device: Xtreme N GIGABIT Router
13:22:58 [INFO] [AutoPortForward] Attempting to forward port..
13:22:58 [SEVERE] [AutoPortForward] Exception while forwarding port:
13:22:58 [SEVERE] net.sbbi.upnp.messages.UPNPResponseException Detailed error code :501, Detailed error description :Internal Parser Error
13:22:58 [SEVERE] at net.sbbi.upnp.messages.ActionMessageResponseParser.startElement(ActionMessageResponseParser.java:145)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:504)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:376)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2732)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:741)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
13:22:58 [SEVERE] at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
13:22:58 [SEVERE] at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
13:22:58 [SEVERE] at net.sbbi.upnp.messages.ActionMessage.service(ActionMessage.java:172)
13:22:58 [SEVERE] at net.sbbi.upnp.impls.InternetGatewayDevice.addPortMapping(InternetGatewayDevice.java:388)
13:22:58 [SEVERE] at com.jca2323.AutoPortForward.AutoPortForwardMain.forwardPort(AutoPortForwardMain.java:103)
13:22:58 [SEVERE] at com.jca2323.AutoPortForward.AutoPortForwardMain.onEnable(AutoPortForwardMain.java:65)
13:22:58 [SEVERE] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:215)
13:22:58 [SEVERE] at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337)
13:22:58 [SEVERE] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381)
13:22:58 [SEVERE] at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:256)
13:22:58 [SEVERE] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:238)
13:22:58 [SEVERE] at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:381)
13:22:58 [SEVERE] at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:368)
13:22:58 [SEVERE] at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:197)
13:22:58 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:432)
13:22:58 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
13:22:58 [INFO] [AutoPortForward] Disabling. Failed to forward port.
13:22:58 [INFO] [AutoPortForward] Disabling AutoPortForward v4.0
13:22:58 [INFO] [AutoPortForward] AutoPortForward disabled.
@Fanged15
You could do that, or you could try different ports.
I think my ISP is blocking the port. I tried the open port checker tool and i put in the port, and it said the port 25571 is closed on my ip adress. Should i call my ISP and ask them?
@Fanged15
Is there any chance your ISP may be blocking the port? What error does your friend get when he tries to connect?
There was no exceptions when the plugin was enabling. My gateway support UPNP. it is a netgeat WNDR3700. There was no errors when enabling. I am using 1.4. I gave my friend my external ip and it still didnt work. Did i do sumthing wrong?
@Fanged15 This plugin works please give me some more information:
Was there an exceptions while the plugin was enabling? Does your gateway support UPNP? Did it have any errors while enabling? What version of the plugin are you using? Are you giving your friend your external IP (Get this from whatsmyip.org )
I put this on my server, and my friend couldn't connect. Did u do anything wrong?