My setup:
- Physical home router Technicolor DGA0122 (A) - 192.168.1.1
- Virtual OpenWrt machine with bridged adapter and a host-only adapter (B) - 192.168.97.1
- Virtual client (C) - 192.168.97.212
Using VirtualBox
I am learning openwrt but I do not have a physical openwrt router so I have to resort to running it on a VM. I have followed setting up upnp daemon from the wiki, I have not modified any configurations beyond what was told.
Running upnp client on (C)
upnpc -listdevices
List of UPNP devices found on the network :
desc: http://192.168.97.1:5000/rootDesc.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1
Found a (not connected?) IGD : http://192.168.97.1:5000/ctl/IPConn
Trying to continue anyway
Local LAN ip address : 192.168.97.212
Connection Type : IP_Routed
Status : Connected, uptime=5126s, LastConnectionError : ERROR_NONE
Time started : Mon Oct 18 11:44:34 2021
MaxBitRateDown : 8388608 bps (8.3 Mbps) MaxBitRateUp 4194304 bps (4.1 Mbps)
GetExternalIPAddress failed. (errorcode=501)
i protocol exPort->inAddr:inPort description remoteHost leaseTime
GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)
Logs from (B)
daemon.notice miniupnpd[3272]: private/reserved address 192.168.1.154 is not suitable for external IP
I have tried running it with -m flags with eth0, eth1, br-lan, nothing seems to work
Running the same command from (B) seems to work fine
upnpc -l
List of UPNP devices found on the network :
desc: http://192.168.1.1:5000/rootDesc.xml
st: urn:schemas-upnp-org:device:InternetGatewayDevice:1
Found valid IGD : http://192.168.1.1:5000/hVtMall/ctl/IPConn
Local LAN ip address : 192.168.1.154
Connection Type : IP_Routed
Status : Connected, uptime=5418177s, LastConnectionError : ERROR_NONE
Time started : Mon Aug 16 17:20:00 2021
MaxBitRateDown : 1000000000 bps (1000.0 Mbps) MaxBitRateUp 1000000000 bps (1000.0 Mbps)
ExternalIPAddress = XXX
i protocol exPort->inAddr:inPort description remoteHost leaseTime
0 TCP 65226->192.168.1.226:19999 '192.168.1.226 log' '88.118.240.10' 0
GetGenericPortMappingEntry() returned 713 (SpecifiedArrayIndexInvalid)
upnp configuration on (B)
config upnpd 'config'
option enabled '1'
option ext_ip_reserved_ignore '1'
option enable_natpmp '1'
option enable_upnp '1'
option secure_mode '1'
option log_output '0'
option download '1024'
option upload '512'
option internal_iface 'lan'
option port '5000'
option upnp_lease_file '/var/run/miniupnpd.leases'
option igdv1 '1'
option uuid 'dd1a76c8-dc19-4b0d-ae9e-dd5753b02610'
config perm_rule
option action 'allow'
option ext_ports '1024-65535'
option int_addr '0.0.0.0/0'
option int_ports '1024-65535'
option comment 'Allow high ports'
config perm_rule
option action 'deny'
option ext_ports '0-2000'
option int_addr '0.0.0.0/0'
option int_ports '0-2000'
option comment 'Default deny'