UPnP port mappings do not work after L2TP WAN reconnect

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.

UPnP port mappings do not work after L2TP WAN reconnect

This thread has been locked for further replies. You can start a new thread to share your ideas or ask questions.
UPnP port mappings do not work after L2TP WAN reconnect
UPnP port mappings do not work after L2TP WAN reconnect
2014-04-08 21:49:15
Region : Others

Model : TL-WR1043ND

Hardware Version : V2

Firmware Version : TL-WR1043ND_V2_130925

ISP : Bezeq


Hello,

Here is the situation.
The router's Internet connection is using L2TP protocol. UPnP port mapping is enabled.
Steps to reproduce the problem:

1. Make sure WAN is connected successfully, e.g. the router has established the L2TP connection and has public IP, accessible on the Internet
2. Connect a host or phone to router's LAN or WiFi.
3. Run an application on that host that opens up a port mapping entry via UPnP. Verify this on Forwarding/UPnP page of the router.
4. The port mapping entry works fine. You can access the the port on the internal host from the outside world.
5. Open router's web interface and press the "Disconnect" button on the WAN interface.
6. Wait a few seconds and press "Connect"
7. Wait until L2TP connection is established and the router got a public IP again. It does not matter if the IP is the same as on p.1 or a new one.
8. Check on router's Forwarding/UPnP page that the mapping established in p.3; Verify that the host's internal IP is still the same and that the application is still listening on the same internal port as specified on the UPnP mapping.
9. Attempt to connect from the outside to the internal host and port using router's public IP and the external port that is mapped on UPnP record. All attempts fail with timeout. Using packet capture on the target internal host proves that no packet arrives.

To fix the above problem, it is enough that:
- A new entry is added via UPnP port mappings from another internal host, or another application on the same host
- An existing mapping is deleted by the application that had opened it
- An existing mapping is updated by the application that opened it.

When any of the above 3 happens, ALL UPnP port mappings that failed start working again!

I think that after L2TP connection is reestablished, the UPnP daemon on the router does not perform the necessary steps to enforce the UPnP mappings already configured.
I have not able to test it with other WAN protocols, but it is highly possible that the same exists with PPPoE and PPPTP.

The issue is very easily reproducible, please provide a solution.
Best Regards
  0      
  0      
#1
Options
2 Reply
Re:UPnP port mappings do not work after L2TP WAN reconnect
2014-04-10 14:35:07
I want to add that the problem also occurs in regular WAN connection (plain Ethernet type).

For example:
1. Configure the WAN interface with dynamic IP settings (to retrieve configuration from DHCP)
2. Allow the clients behind the router to open their port forwardings at the router
3. Press "Release" on WAN page. Wait a few seconds and press "Renew"
4. The router now has either a new IP address or the same one it used previously (depends on DHCP server at the WAN side)
5. Any attempt to reach the clients through the port mappings fail, until something is changed on the UPnP table.

Thanks
  0  
  0  
#2
Options
Re:UPnP port mappings do not work after L2TP WAN reconnect
2014-04-10 14:37:04
Update:
The problem happens also on 1043ND hardware version 1, so it is not isolated on v2 only.
  0  
  0  
#3
Options