View previous topic :: View next topic |
Author |
Message |
cmsdloma
Joined: 27 Feb 2013 Posts: 5 Location: London, UK
|
Posted: Wed Feb 27, 2013 11:42 am Post subject: More detailed logging to debug UPnP troubles |
|
|
Hi,
I'm having UPnP troubles on my network... I can't even tell if the broadcast packets are being received by MiniUPnPd, as it doesn't log anything. (Or maybe it does and it's not getting there!?).
I can see the startup lines written to /var/log/syslog and the process is running, but it doesn't log any traffic.
I would really like to see one line written to the log with the IP/MAC address of the sender and some info about the UPnP packet/request, such as if it is UPnP/NET-PMP and the port requested to be opened, etc.
I would also like to see one line written to the log for each response that MiniUPnP replies back.
Please please can we have this, as it would really help me in building the ultimate router!
Many thanks,
Dave |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1585
|
Posted: Fri Mar 01, 2013 5:19 pm Post subject: |
|
|
verbose logging is available in debug mode. use -d switch on the command line. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
cmsdloma
Joined: 27 Feb 2013 Posts: 5 Location: London, UK
|
Posted: Sat Mar 02, 2013 1:10 pm Post subject: Send detailed log to file |
|
|
Hi,
Many thanks for your reply. Yes, I can run it interactively with -d and I see the output as per below:
Code: |
root@Artigo:/etc/miniupnpd# miniupnpd -f miniupnpd.conf -d
miniupnpd[8655]: system uptime is 53466 seconds
miniupnpd[8655]: HTTP listening on port 42676
miniupnpd[8655]: no HTTP IPv6 address
miniupnpd[8655]: Listening for NAT-PMP traffic on port 5351
miniupnpd[8655]: chain MINIUPNPD not found
miniupnpd[8655]: HTTP connection from [::ffff:192.168.42.104]:55802
miniupnpd[8655]: HTTP REQUEST : GET /rootDesc.xml (HTTP/1.1)
miniupnpd[8655]: SSDP M-SEARCH from 192.168.42.104:56713 ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
miniupnpd[8655]: Single search found
miniupnpd[8655]: SSDP Announce 411 bytes to 192.168.42.104:56713 ST: HTTP/1.1 200 OK
CACHE-CONTROL: max-age=120
ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
USN: uuid:2f433382-814a-4f5d-a352-321242e3ecc1::urn:schemas-upnp-org:device:InternetGatewayDevice:1
EXT:
SERVER: Debian/sid UPnP/1.1 MiniUPnPd/1.7
LOCATION: http://192.168.42.254:42676/rootDesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 1
BOOTID.UPNP.ORG: 1
CONFIGID.UPNP.ORG: 1337
miniupnpd[8655]: SSDP M-SEARCH from 192.168.42.104:56713 ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
miniupnpd[8655]: Single search found
miniupnpd[8655]: SSDP Announce 411 bytes to 192.168.42.104:56713 ST: HTTP/1.1 200 OK
CACHE-CONTROL: max-age=120
ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1
USN: uuid:2f433382-814a-4f5d-a352-321242e3ecc1::urn:schemas-upnp-org:device:InternetGatewayDevice:1
EXT:
SERVER: Debian/sid UPnP/1.1 MiniUPnPd/1.7
LOCATION: http://192.168.42.254:42676/rootDesc.xml
OPT: "http://schemas.upnp.org/upnp/1/0/"; ns=01
01-NLS: 1
BOOTID.UPNP.ORG: 1
CONFIGID.UPNP.ORG: 1337
|
This is more than I need actually.
I want to keep a record of which clients send UPnP requests when it is running permanently in service mode. I don't need all of the above, but I at least want to log all of the requesting client IP address and type of request. I would really like these to go to the main (or separate) log, as 1-3 lines per request.
Please could you add like an audit/access-log feature? I would be so grateful.
Many thanks. |
|
Back to top |
|
 |
miniupnp Site Admin
Joined: 14 Apr 2007 Posts: 1585
|
Posted: Mon Mar 04, 2013 10:23 am Post subject: |
|
|
you could modify the syslog calls in miniupnpd to do whatever you want. Then configure your syslog.conf to send the logs to a specific file. _________________ Main miniUPnP author.
https://miniupnp.tuxfamily.org/ |
|
Back to top |
|
 |
cmsdloma
Joined: 27 Feb 2013 Posts: 5 Location: London, UK
|
Posted: Mon Mar 04, 2013 10:43 am Post subject: Debug logging when running as a service |
|
|
Hi,
Thanks for your reply. Assuming I take the approach you suggest, how do I turn on debugging permanently in the miniupnp.conf? It doesn't like 'debug'.
Cheers. |
|
Back to top |
|
 |
|