Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Site to Site VPNs in VPN overview #108

Open
ckoeber83 opened this issue Jul 27, 2023 · 5 comments
Open

Site to Site VPNs in VPN overview #108

ckoeber83 opened this issue Jul 27, 2023 · 5 comments
Labels
awaiting-answer blocked-by-InfluxDB-mess First the way forward with InfluxDB needs to be solved - see #114

Comments

@ckoeber83
Copy link

Hi bb-Ricardo,

it would be great if to have the stats for site to site VPNs in VPN overview too aka "VPN-Verbindungen zwischen der FRITZ!Box und anderen Netzwerken / LAN-LAN-Kopplungen"

grafik
grafik

@bb-Ricardo
Copy link
Owner

Hi,

sorry I missed your issue.

I think this should be possible. Could you get me the output of the json data for this page?

@bb-Ricardo
Copy link
Owner

Hi @ckoeber83, not an issue.

unfortunately pdf is not the ideal format for extracting data. A better approach would be a copy&paste from a browser.

here an example for Chrome:

  • open Chrome
  • enable developer tools (Ctrl+Shift+i)
  • select Network
  • login to you fritzbox
  • navigate to the page you want to get data for
  • find the last data.lua (or maybe even other names) resource and select it
    • select Payload and copy all of it to the comment
    • select Response and copy all of it to the comment

Example: Payload
image

Example: Response
image

Then the result can be added directly in your comment:

PAYLOAD:
xhr: 1
sid: 826bab056813b1e3
lang: de
page: shareVpn
xhrId: all

RESPONSE:
{
    "pid": "shareVpn",
    "hide": {
        "shareUsb": true,
        "liveTv": true,
        "dectRdio": true,
        "rrd": true,
        "rss": true,
        "mobile": true,
        "dectMail": true,
        "provServ": true,
        "ssoSet": true,
        "liveImg": true
    },
    "timeTillLogout": "1200",
    "time": [],
    "data": {
        "init": {
            "userConnections": {
                "connection1": {
                    "connected": false,
                    "active": true,
                    "userId": "boxuser11",
...

Once I have this data and examples it is easy to integrate it.

Maybe Christmas family dinner get's boring and you need an excuse to do something very important 😄

Thank you very much and Merry Christmas to you too.

This was referenced Dec 22, 2023
@ckoeber83
Copy link
Author

Hi @bb-Ricardo,

Sorry for any inconvenience. Here is the output from my browser:


grafik

Payload

"xhr": "1",
"sid": "15018212484c54b6",
"lang": "de",
"page": "shareVpn",
"xhrId": "all"

Response

{
	"pid": "shareVpn",
	"hide": {
		"shareUsb": true,
		"liveTv": true,
		"dectRdio": true,
		"dectMoniEx": true,
		"rss": true,
		"ssoSet": true,
		"dectMail": true,
		"provServ": true,
		"rrd": true,
		"liveImg": true
	},
	"timeTillLogout": "1200",
	"time": [],
	"data": {
		"init": {
			"userConnections": {
				"connection4": {
					"connected": false,
					"active": true,
					"userId": "",
					"deletable": true,
					"address": "",
					"type": "homeNetworkVpn",
					"psk": "",
					"virtualAddress": "192.168.178.202",
					"name": ""
				},
				"connection3": {
					"connected": false,
					"active": true,
					"userId": "boxuser10",
					"deletable": true,
					"address": "",
					"type": "homeNetworkVpn",
					"psk": "",
					"virtualAddress": "192.168.178.201",
					"name": ""
				},
				"connection0": {
					"connected": false,
					"active": true,
					"userId": "",
					"deletable": true,
					"address": "",
					"type": "homeNetworkVpn",
					"psk": "",
					"virtualAddress": "192.168.178.203",
					"name": ""
				},
				"connection1": {
					"connected": false,
					"active": true,
					"userId": "",
					"deletable": true,
					"address": "",
					"type": "homeNetworkVpn",
					"psk": "",
					"virtualAddress": "192.168.178.204",
					"name": ""
				},
				"connection2": {
					"connected": false,
					"active": true,
					"userId": "",
					"deletable": true,
					"address": "",
					"type": "homeNetworkVpn",
					"psk": "",
					"virtualAddress": "192.168.178.205",
					"name": ""
				}
			},
			"type": "IPSec Xauth PSK",
			"help": {
				"url": "/secure_link.lua?sid=15018212484c54b6&lnk=https%3A%2F%2Fassets.avm.de%2Ffbvpnportal%2F%3Fhardware%3D234%26oem%3Davm%26language%3Dde%26country%3D049%26version%3D162.07.57%26subversion%3D",
				"text": ""
			},
			"boxConnections": {
				"connection8": {
					"type": "homeNetworkVpn",
					"active": true,
					"localNet": "192.168.178.0 /24",
					"connected": true,
					"remoteNet": "192.168.181.0 /24",
					"deletable": true,
					"accessDefaultRoute": "0",
					"accessHostname": "myfritz.net",
					"editable": true,
					"remoteIP": "",
					"name": ""
				},
				"connection12": {
					"type": "homeNetworkVpn",
					"active": false,
					"localNet": "192.168.178.0 /24",
					"connected": false,
					"remoteNet": "192.168.180.0 /24",
					"deletable": true,
					"accessDefaultRoute": "0",
					"accessHostname": "myfritz.net",
					"editable": true,
					"remoteIP": "",
					"name": ""
				}
			},
			"server": "myfritz.net"
		}
	},
	"sid": "15018212484c54b6"
}

grafik

Payload

{
	"xhr": "1",
	"sid": "15018212484c54b6",
	"lang": "de",
	"page": "shareWireguard",
	"xhrId": "all"
}

Response

{
	"pid": "shareWireguard",
	"hide": {
		"shareUsb": true,
		"liveTv": true,
		"dectRdio": true,
		"dectMoniEx": true,
		"rss": true,
		"ssoSet": true,
		"dectMail": true,
		"provServ": true,
		"rrd": true,
		"liveImg": true
	},
	"timeTillLogout": "1200",
	"time": [],
	"data": {
		"init": {
			"wg_public_key": "",
			"type": "IPSec Xauth PSK",
			"wg_device_config": "UIM_FAIL_TWOFACTOR_AUTH_NEEDED",
			"ddnsActivated": true,
			"userConnections": [],
			"help": {
				"url": "/secure_link.lua?sid=15018212484c54b6&lnk=https%3A%2F%2Fassets.avm.de%2Ffbvpnportal%2F%3Fhardware%3D234%26oem%3Davm%26language%3Dde%26country%3D049%26version%3D162.07.57%26subversion%3D",
				"text": ""
			},
			"wg_list_port": "51016",
			"wg_global_error": {
				"eventId": "3400",
				"eventMsg": "Konfiguration der WireGuard-Gegenstelle ist korrekt."
			},
			"wg_default_id": ".myfritz.net",
			"boxConnections": {
				"connection13": {
					"type": "wireguard_lan_lan",
					"active": true,
					"localNet": "192.168.178.0",
					"wgEndpoint": "",
					"connectedSince": "1703287966",
					"connected": true,
					"remoteNet": "192.168.180.0/24",
					"deletable": true,
					"accessDefaultRoute": "0",
					"accessHostname": "",
					"editable": true,
					"remoteIp": "",
					"name": ""
				},
				"connection14": {
					"type": "wireguard_lan_lan",
					"active": true,
					"localNet": "192.168.178.0",
					"wgEndpoint": "",
					"connectedSince": "1703287942",
					"connected": true,
					"remoteNet": "192.168.183.0/24",
					"deletable": true,
					"accessDefaultRoute": "0",
					"accessHostname": "",
					"editable": true,
					"remoteIp": "",
					"name": ""
				},
				"connection9": {
					"type": "wireguard_simple",
					"active": true,
					"localNet": "192.168.178.0 /24",
					"wgEndpoint": "",
					"connectedSince": "0",
					"connected": false,
					"remoteNet": "192.168.178.209/32",
					"deletable": true,
					"accessDefaultRoute": "0",
					"accessHostname": "::",
					"editable": true,
					"remoteIp": "",
					"name": ""
				},
				"connection6": {
					"type": "wireguard_simple",
					"active": true,
					"localNet": "192.168.178.0 /24",
					"wgEndpoint": "",
					"connectedSince": "0",
					"connected": false,
					"remoteNet": "192.168.178.208/32",
					"deletable": true,
					"accessDefaultRoute": "0",
					"accessHostname": "::",
					"editable": true,
					"remoteIp": "",
					"name": ""
				},
				"connection7": {
					"type": "wireguard_simple",
					"active": true,
					"localNet": "192.168.178.0 /24",
					"wgEndpoint": "",
					"connectedSince": "0",
					"connected": false,
					"remoteNet": "192.168.178.207/32",
					"deletable": true,
					"accessDefaultRoute": "0",
					"accessHostname": "::",
					"editable": true,
					"remoteIp": "",
					"name": ""
				},
				"connection10": {
					"type": "wireguard_simple",
					"active": true,
					"localNet": "192.168.178.0 /24",
					"wgEndpoint": "",
					"connectedSince": "0",
					"connected": false,
					"remoteNet": "192.168.178.210/32",
					"deletable": true,
					"accessDefaultRoute": "0",
					"accessHostname": "::",
					"editable": true,
					"remoteIp": "",
					"name": ""
				},
				"connection11": {
					"type": "wireguard_lan_lan",
					"active": true,
					"localNet": "192.168.178.0 /24",
					"wgEndpoint": "",
					"connectedSince": "1703288058",
					"connected": true,
					"remoteNet": "192.168.182.0/24",
					"deletable": true,
					"accessDefaultRoute": "0",
					"accessHostname": "::",
					"editable": true,
					"remoteIp": "",
					"name": ""
				},
				"connection5": {
					"type": "wireguard_simple",
					"active": true,
					"localNet": "192.168.178.0 /24",
					"wgEndpoint": "",
					"connectedSince": "1702827449",
					"connected": false,
					"remoteNet": "192.168.178.206/32",
					"deletable": true,
					"accessDefaultRoute": "0",
					"accessHostname": "::",
					"editable": true,
					"remoteIp": "",
					"name": ""
				}
			},
			"server": "myfritz.net"
		}
	},
	"sid": "15018212484c54b6"
}

@bb-Ricardo
Copy link
Owner

Nonneed to be sorry, this is exactly what I needed. Thank you. 🙏🏼

@bb-Ricardo
Copy link
Owner

Sorry for not working on this. It is currently blocked by this issue #114. I need to find a good way forward with influxDB as I don't like to repeat everything once again.

Any ideas from your side?

@bb-Ricardo bb-Ricardo added the blocked-by-InfluxDB-mess First the way forward with InfluxDB needs to be solved - see #114 label Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-answer blocked-by-InfluxDB-mess First the way forward with InfluxDB needs to be solved - see #114
Projects
None yet
Development

No branches or pull requests

2 participants