Home

A free C++ BitTorrent/HTTP/FTP Download Client

add_port_mapping_in_nat_router
 

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
add_port_mapping_in_nat_router [2012/08/23 15:52]
greywizard [Add Port Mapping in NAT Router]
add_port_mapping_in_nat_router [2013/02/22 20:11]
greywizard [Add Port Mapping in NAT Router]
Line 3: Line 3:
 <​html><​span style=color:​darkred;​font-weight:​bold>​Note:</​span></​html>​ <​html><​span style=color:​darkred;​font-style:​italic>​If you are connected to the Internet through a wireless modem (usually a USB stick) which uses mobile phone wireless telecommunications technology (such as GPRS, EDGE, EVDO, HSPA, UMTS, etc.) most likely your Internet connection will be firewalled at the ISP site by default (so you basically get only half of an Internet connection, without the possibility of successful incoming connections). Short of contacting your ISP to ask if there is a possibility to get full Internet connections on the same device or changing your Internet subscription plan for one that has incoming connections unfirewalled by default (all xDSL, cable or FiOS providers usually offer unfirewalled connections),​ there is nothing you can do on your side to unblock incoming connections,​ therefore there is no point in following this guide or any other port-forwarding guide, for that matter, because you will still have incoming connections blocked on all your ports!</​span></​html>​ <​html><​span style=color:​darkred;​font-weight:​bold>​Note:</​span></​html>​ <​html><​span style=color:​darkred;​font-style:​italic>​If you are connected to the Internet through a wireless modem (usually a USB stick) which uses mobile phone wireless telecommunications technology (such as GPRS, EDGE, EVDO, HSPA, UMTS, etc.) most likely your Internet connection will be firewalled at the ISP site by default (so you basically get only half of an Internet connection, without the possibility of successful incoming connections). Short of contacting your ISP to ask if there is a possibility to get full Internet connections on the same device or changing your Internet subscription plan for one that has incoming connections unfirewalled by default (all xDSL, cable or FiOS providers usually offer unfirewalled connections),​ there is nothing you can do on your side to unblock incoming connections,​ therefore there is no point in following this guide or any other port-forwarding guide, for that matter, because you will still have incoming connections blocked on all your ports!</​span></​html>​
  
-To get the best speeds, BitComet needs open listening port, just as most other P2P applications do. But if you are behind a router or use Windows Internet Connection Sharing (ICS) or you are behind a firewall, you might need to make some adjustments before you get rid of the infamous [[bitcomet_status_bar|yellow light]] and BitComet works as intended. Namely, you'll probably have to configure your router and/or firewall(s) in order to open the listening port of BitComet. In this topic we will discuss the configuration of the router (port forwarding) both automatic (through UPnP) and manual, to the end of opening a port in your router'​s firewall and forwarding it on the setup page of your router, for BitComet. Software firewall configuration (the one residing on your computer) is discussed in the next topic ([[create_firewall_rules|Create Firewall Rules]]).+To get the best speeds, BitComet needs an open listening port, just as most other P2P applications do. But if you are behind a router or use Windows Internet Connection Sharing (ICS) or you are behind a firewall, you might need to make some adjustments before you get rid of the infamous [[bitcomet_status_bar|yellow light]] and BitComet works as intended. Namely, you'll probably have to configure your router and/or firewall(s) in order to open the listening port of BitComet. In this topic we will discuss the configuration of the router (port forwarding) both automatic (through UPnP) and manual, to the end of opening a port in your router'​s firewall and forwarding it on the setup page of your router, for BitComet. Software firewall configuration (the one residing on your computer) is discussed in the next topic ([[create_firewall_rules|Create Firewall Rules]]).
  
  
Line 91: Line 91:
   and search for it.   and search for it.
  
-OR 
  
-To manually check whether you have a MODEM or a ROUTER, follow these instructions below:+ 
 +Alternatively,​ to manually check whether you have a MODEM or a ROUTER, follow these instructions below:
  
     * Click on Start -> Run -> type //cmd// -> press Enter or OK -> type //​ipconfig//​ -> press Enter.     * Click on Start -> Run -> type //cmd// -> press Enter or OK -> type //​ipconfig//​ -> press Enter.
Line 205: Line 205:
 //If you don't know what type of devices you have, retrieve the model numbers from them (they should be marked on the device or on the label beneath) and search them on the Internet.// //If you don't know what type of devices you have, retrieve the model numbers from them (they should be marked on the device or on the label beneath) and search them on the Internet.//
  
-The main difference between a simple modem and a modem/​router combo is that a simple modem will act like a mere bridge device and not like a border device for IP networks (broadcast domain limiter). That is, it will pass the public IP address assigned to you by your ISP, to the device which is downstream (a PC or a router) thus extending your ISP's network (at the TCP/IP Internet layer) beyond itself, down to the next device.+The main difference between a simple modem and a modem/​router combo is that a simple modem will act like a mere bridge device ​(a Layer 2 or Data Link device) ​and not like a border device for IP networks (broadcast domain limiter). That is, it will pass the public IP address assigned to you by your ISP, to the device which is downstream (a PC or a router) thus extending your ISP's network (at the TCP/IP Internet layer) beyond itself, down to the next device. In other words it is transparent for Layer 3 traffic (Layer 3 or Network-Layer/​Internet-Layer is the level at which IP addressing is used).
  
-On the other hand, a router will end your ISP's network at its WAN interface (the router connected directly to the Internet has the public IP given from your ISP, assigned to its WAN interface). From there further downstream, (for the LAN side) private ([[http://​tools.ietf.org/​html/​rfc1918|RFC 1918]]) addresses are used (from the 10.0.0.0/8, 172.16.0.0/​12 and 192.168.0.0/​16 address ranges).+On the other hand, a router will end your ISP's network at its WAN interface (the router connected directly to the Internet has the public IP given from your ISP, assigned to its WAN interface). From there further downstream, (for the LAN side) private ([[http://​tools.ietf.org/​html/​rfc1918|RFC 1918]]) addresses are used (from the 10.0.0.0/8, 172.16.0.0/​12 and 192.168.0.0/​16 address ranges). In other words a router IS a Layer 3 device.
  
 Since more and more devices come in integrated combo models, **modem/​router**,​ **modem/​router/​switch** or **modem/​router/​switch/​wireless-access point** devices are very common these days.\\ ​ Since more and more devices come in integrated combo models, **modem/​router**,​ **modem/​router/​switch** or **modem/​router/​switch/​wireless-access point** devices are very common these days.\\ ​
Line 214: Line 214:
 If that is your case, then you're probably using a topology similar with the one below (the IP addresses used in the figure below are used for exemplification,​ yours will vary according to your ISP and your particular equipment): ​ If that is your case, then you're probably using a topology similar with the one below (the IP addresses used in the figure below are used for exemplification,​ yours will vary according to your ISP and your particular equipment): ​
  
-{{:network_scheme_01.png|}}+{{:network_scheme_02.png|}}
  
 For the purpose of the following discussion we're going to assume that you use a topology similar to the one above (which is the most common). We'll also assume that both your devices are operating in "​router"​ mode. The "​listen port" collocation is to be understood as the port number you've set on the //​Options->​Connection//​ page of BitComet, under the "​Listen port" section. For the purpose of the following discussion we're going to assume that you use a topology similar to the one above (which is the most common). We'll also assume that both your devices are operating in "​router"​ mode. The "​listen port" collocation is to be understood as the port number you've set on the //​Options->​Connection//​ page of BitComet, under the "​Listen port" section.
  
-So, usually the user has an Internet connection (DSL or cable) which comes plugged into the modem/​router'​s WAN port. We'll call your modem/​router, ​Router1.\\  +So, usually the user has an Internet connection (DSL or cable) which comes plugged into the modem/​router'​s WAN port. We'll call your modem/​router, ​__Router1__.\\  
-From one of Router1's LAN (Ethernet) ports (often there is only one), usually, another Ethernet cable emerges which is plugged into the other router/​switch device'​s WAN port (or router/​switch/​wireless-access point).\\  +From one of __Router1__'s LAN (Ethernet) ports (often there is only one), usually, another Ethernet cable emerges which is plugged into the other router/​switch device'​s WAN port (or router/​switch/​wireless-access point).\\  
-We'll call this second device, ​Router2.\\  +We'll call this second device, ​__Router2__.\\  
-We'll call the network between ​Router1 ​and Router2 LAN-and the network between ​Router2 ​and your PCs LAN-B.+We'll call the network between ​__Router1__ ​and __Router2__,​ __LAN-A__, and the network between ​__Router2__ ​and your PCs, __LAN-B__.
  
 The thing you need to understand is that NAT ([[wp>​Network_address_translation|Network Address Translation]]) will need to be performed **twice** before any IP packet will reach from the Internet to any of your PCs or from your PCs to the Internet. The thing you need to understand is that NAT ([[wp>​Network_address_translation|Network Address Translation]]) will need to be performed **twice** before any IP packet will reach from the Internet to any of your PCs or from your PCs to the Internet.
  
-That is because NAT is being performed //once// from the public IP address used by the WAN-Router1 ​interface toward the private address used by the Router2's WAN interface and //the second time//, NAT is being performed from the private address of the Router2's WAN interface to the private address of your PC (which is part of a different private subnetwork).\\  +That is because NAT is being performed //once// from the public IP address used by the WAN interface ​of __Router1__ ​toward the private address used by the __Router2__'s WAN interface and //the second time//, NAT is being performed from the private address of the __Router2__'s WAN interface to the private address of your PC (which is part of a different private subnetwork).\\  
-Note that the Router2's WAN interface is assigned a private address from LAN-A but it has no idea about that; as far as Router2 ​is concerned, it is connected to the Internet and it has to perform address translation,​ so to speak.+Note that the __Router2__'s WAN interface is assigned a private address from LAN-A but it has no idea about that; as far as __Router2__ ​is concerned, it may be connected to the Internet and it has to perform address translation,​ so to speak (unless you have the option to turn off NAT on it).
  
-You will have 2 private address ​spacesLAN-(most of the times made up of just one of Router1's LAN ports and Router2'​s WAN interface) and LAN-(made up of the gateway IP for Router2of the PCs connected to Router2's switch ports and, if available, the PCs/devices connected to the wireless access point). ​LAN-A's address space will be given/set by Router1 ​and LAN-B's address space will be given/set by Router2 ​(most of the time it will be a /24 network of the type 192.168.x.0 and thus you will have addresses 192.168.x.1-192.168.x.254 available for use (although on the LAN/DHCP settings page of your router, it may use only a part of that address space for the DHCP pool, leaving the rest of them for manual static assigning).+You will have 2 private address ​subnetworks__LAN-A__ (most of the times made up of just one of __Router1__'s LAN ports and Router2'​s WAN interface) and __LAN-B__ (made up of the gateway IP for __Router2__plus the PCs connected to __Router2__'s switch ports and, if available, the PCs/devices connected to the wireless access point). ​__LAN-A__'s address space will be given/set by __Router1__ ​and __LAN-B__'s address space will be given/set by __Router2__ ​(most of the time it will be a /24 network of the type 192.168.x.0 and thus you will have addresses 192.168.x.1-192.168.x.254 available for use (although on the LAN/DHCP settings page of your router, it may use only a part of that address space for the DHCP pool, leaving the rest of them for manual static assigning).
  
   Therefore all the instructions from the previous section apply twice!   Therefore all the instructions from the previous section apply twice!
  
-You will need to treat Router2 ​as if it were a PC (as far as Router1 ​is concerned) and assign to its WAN interface a **fixed** IP from the range of LAN-A. After that you will forward the listen port, on Router1, towards the IP you assigned to the WAN interface of Router2.\\  +You will need to treat __Router2__ ​as if it were a PC (as far as __Router1__ ​is concerned) and assign to its WAN interface a **fixed** IP address ​from the range of __LAN-A__. After that you will forward the listen port, on __Router1__ (the modem), towards the IP you assigned to the WAN interface of __Router2__.\\  
-Then you will need to perform port forwarding once more on Router2. This time you will, finally, assign a fixed IP to your PC, from the range of LAN-B. Then you will forward the same listen port on Router2 ​towards the fixed IP you assigned to your PC. This way the listen port will be forwarded all the way from the public IP of the WAN interface on Router1 ​to the LAN NIC card of your PC.\\ +Then you will need to perform port forwarding once more on __Router2__. This time you will, finally, assign a fixed IP to your PC, from the range of __LAN-B__. Then you will forward the same listen port on __Router2__ ​towards the fixed IP you assigned to your PC. This way the listen port will be forwarded all the way from the public IP of the WAN interface on __Router1__ ​to the LAN NIC card of your PC.\\ 
 Detailed instructions on the forwarding steps, you can find in the previous section. This section here has the purpose of merely elaborating the specific differences for this particular case. Detailed instructions on the forwarding steps, you can find in the previous section. This section here has the purpose of merely elaborating the specific differences for this particular case.
  
 <​html><​span style=color:​darkred;​font-weight:​bold>​Attention!</​span></​html>​ **Make sure that you forward the listen port on Router1, towards the WAN interface IP of Router2 and not towards your PC's IP!!!** <​html><​span style=color:​darkred;​font-weight:​bold>​Attention!</​span></​html>​ **Make sure that you forward the listen port on Router1, towards the WAN interface IP of Router2 and not towards your PC's IP!!!**
  
-So, using the IP addresses from the topology in the figure above, you will have to forward the listen port on Router1 ​towards 192.168.0.15. +So, as an example, using the IP addresses from the topology in the figure above, you will have to forward the listen port on __Router1__ ​towards 192.168.0.15. 
-On Router2 ​you will have to forward the same listen port towards 192.168.3.100 (we assumed that this is the PC running BitComet).+On __Router2__ ​you will have to forward the same listen port towards 192.168.3.100 (we assumed that this is the PC running BitComet).
  
 <​html><​span style=font-weight:​bold>​Note:</​span></​html>​ //The IP addresses above are simple examples. You should use IP addresses from the ranges available on your specific devices.// <​html><​span style=font-weight:​bold>​Note:</​span></​html>​ //The IP addresses above are simple examples. You should use IP addresses from the ranges available on your specific devices.//
 
add_port_mapping_in_nat_router.txt · Last modified: 2015/08/15 04:21 (external edit)
[unknown button type]
 
Recent changes RSS feed Driven by DokuWiki