From 47fc3b0d0bae81901e683a5ae0eeb23240ff8a97 Mon Sep 17 00:00:00 2001
From: zzz
UPnP Configuration:
/>
- Enable UPnP to open firewall ports UPnP status
+ Enable UPnP to open firewall ports - UPnP status
IP Configuration:
Externally reachable hostname or IP address:
@@ -134,11 +134,11 @@
if we are not firewalled
/>
Always use auto-detected IP address (Not firewalled)
- />
- Disable inbound (Firewalled)
/>
Specify hostname or IP:
" />
+ />
+ Disable inbound (Firewalled)
/>
Completely disable (select only if behind a firewall that throttles or blocks outbound TCP - change requires restart)
@@ -155,30 +155,45 @@
If you can, please poke a hole in your NAT or firewall to allow unsolicited UDP packets to reach - you on your external UDP address. If you can't, I2P now includes supports UDP hole punching - with "SSU introductions" - peers who will relay a request from someone you don't know to your - router for your router so that you can make an outbound connection to them. I2P will use these - introductions automatically if it detects that the port is not forwarded (as shown by - the Reachability: Firewalled line). - Users behind symmetric NATs, such as OpenBSD's pf, are not currently supported.
++ While I2P will work fine behind most firewalls, your speeds and network integration will generally improve + if the I2P port (generally 8887) is forwarded for both UDP and TCP. +
+ If you can, please poke a hole in your firewall to allow unsolicited UDP and TCP packets to reach + you. If you can't, I2P supports UPnP (Universal Plug and Play) and UDP hole punching + with "SSU introductions" to relay traffic. Most of the options above are for special situations, + for example where UPnP does not work correctly, or a firewall not under your control is doing + harm. Certain firewalls such as symmetric NATs may not work well with I2P. +
-Hostnames entered here will be published in the network database. +
+ UPnP is used to communicate with Internet Gateway Devices (IGDs) to detect the external IP address + and forward ports. + UPnP support is beta, and may not work for any number of reasons: +
Hostnames entered above will be published in the network database. They are not private. Also, do not enter a private IP address like 127.0.0.1 or 192.168.1.1. -
-You do not need to allow inbound TCP connections - outbound connections work with no - configuration. However, if you want to receive inbound TCP connections, you must poke a hole - in your NAT or firewall for unsolicited TCP connections. If you specify the wrong IP address or + If you specify the wrong IP address or hostname, or do not properly configure your NAT or firewall, your network performance will degrade - substantially. When in doubt, leave the hostname and port number blank.
+ substantially. When in doubt, leave the settings at the defaults. +- While I2P will work adequately behind a firewall, your speeds and network integration will generally improve - if you open up your port (generally 8887) to both UDP and TCP, and enable inbound TCP above. + While I2P will work fine behind most firewalls, your speeds and network integration will generally improve + if the I2P port (generally 8887) to both UDP and TCP. If you think you have opened up your firewall and I2P still thinks you are firewalled, remember that you may have multiple firewalls, for example both software packages and external hardware routers. If there is an error, the logs may also help diagnose the problem. diff --git a/router/java/src/net/i2p/router/transport/TransportManager.java b/router/java/src/net/i2p/router/transport/TransportManager.java index 291e2f6c1..aa66ae068 100644 --- a/router/java/src/net/i2p/router/transport/TransportManager.java +++ b/router/java/src/net/i2p/router/transport/TransportManager.java @@ -131,7 +131,12 @@ public class TransportManager implements TransportEventListener { } public void startListening() { - if (_upnpManager != null) + // For now, only start UPnP if we have no publicly-routable addresses + // so we don't open the listener ports to the world. + // Maybe we need a config option to force on? Probably not. + // What firewall supports UPnP and is configured with a public address on the LAN side? + // Unlikely. + if (_upnpManager != null && Addresses.getAnyAddress() == null) _upnpManager.start(); configTransports(); _log.debug("Starting up the transport manager");