WireGuard Connection
wireguard/state
The current WireGuard state.
| Name | Description |
|---|---|
stateint | State of the connection to the WireGuard peer
|
connection_startint (ms) | Time in milliseconds when the last connection was established. |
connection_endint (ms) | Time in milliseconds when the last connection was disconnected. |
wireguard/config
The WireGuard configuration.
# $HOST e.g. warp-AbCd
Read
curl http://$HOST/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
curl http://$HOST/wireguard/config -d '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
With MQTT on $PREFIX/wireguard/config_update
mosquitto_pub -h $BROKER -t $PREFIX/wireguard/config_update -m '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
| Name | Description |
|---|---|
enablebool | Indicates whether a WireGuard connection to the configured peer should be established.
|
make_default_interfacebool | Indicates whether all non-local network traffic should be routed through WireGuard.
|
internal_ipstring | IP address of the device in the WireGuard network |
internal_subnetstring | Subnet mask of the WireGuard network |
internal_gatewaystring | Gateway of the WireGuard network |
remote_hoststring | Public address or hostname of the peer to which a WireGuard connection should be established |
remote_portint | Port of the peer to which a WireGuard connection should be established |
local_portint | Port from which the WireGuard connection is established |
private_keystring | Private key of the device (44 Base64 characters or empty) |
remote_public_keystring | Public key of the peer to which a WireGuard connection should be established (44 Base64 characters or empty) |
preshared_keystring | Preshared key (PSK) of the connection between device and peer (44 Base64 characters or empty) |
allowed_ipstring | Allowed source IP of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
allowed_subnetstring | Allowed subnet mask of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
wireguard/state
The current WireGuard state.
| Name | Description |
|---|---|
stateint | State of the connection to the WireGuard peer
|
connection_startint (ms) | Time in milliseconds when the last connection was established. |
connection_endint (ms) | Time in milliseconds when the last connection was disconnected. |
wireguard/config
The WireGuard configuration.
# $HOST e.g. warp2-AbCd
Read
curl http://$HOST/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
curl http://$HOST/wireguard/config -d '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp2/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
With MQTT on $PREFIX/wireguard/config_update
mosquitto_pub -h $BROKER -t $PREFIX/wireguard/config_update -m '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
| Name | Description |
|---|---|
enablebool | Indicates whether a WireGuard connection to the configured peer should be established.
|
make_default_interfacebool | Indicates whether all non-local network traffic should be routed through WireGuard.
|
internal_ipstring | IP address of the device in the WireGuard network |
internal_subnetstring | Subnet mask of the WireGuard network |
internal_gatewaystring | Gateway of the WireGuard network |
remote_hoststring | Public address or hostname of the peer to which a WireGuard connection should be established |
remote_portint | Port of the peer to which a WireGuard connection should be established |
local_portint | Port from which the WireGuard connection is established |
private_keystring | Private key of the device (44 Base64 characters or empty) |
remote_public_keystring | Public key of the peer to which a WireGuard connection should be established (44 Base64 characters or empty) |
preshared_keystring | Preshared key (PSK) of the connection between device and peer (44 Base64 characters or empty) |
allowed_ipstring | Allowed source IP of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
allowed_subnetstring | Allowed subnet mask of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
wireguard/state
The current WireGuard state.
| Name | Description |
|---|---|
stateint | State of the connection to the WireGuard peer
|
connection_startint (ms) | Time in milliseconds when the last connection was established. |
connection_endint (ms) | Time in milliseconds when the last connection was disconnected. |
wireguard/config
The WireGuard configuration.
# $HOST e.g. warp3-AbCd
Read
curl http://$HOST/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
curl http://$HOST/wireguard/config -d '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp3/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
With MQTT on $PREFIX/wireguard/config_update
mosquitto_pub -h $BROKER -t $PREFIX/wireguard/config_update -m '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
| Name | Description |
|---|---|
enablebool | Indicates whether a WireGuard connection to the configured peer should be established.
|
make_default_interfacebool | Indicates whether all non-local network traffic should be routed through WireGuard.
|
internal_ipstring | IP address of the device in the WireGuard network |
internal_subnetstring | Subnet mask of the WireGuard network |
internal_gatewaystring | Gateway of the WireGuard network |
remote_hoststring | Public address or hostname of the peer to which a WireGuard connection should be established |
remote_portint | Port of the peer to which a WireGuard connection should be established |
local_portint | Port from which the WireGuard connection is established |
private_keystring | Private key of the device (44 Base64 characters or empty) |
remote_public_keystring | Public key of the peer to which a WireGuard connection should be established (44 Base64 characters or empty) |
preshared_keystring | Preshared key (PSK) of the connection between device and peer (44 Base64 characters or empty) |
allowed_ipstring | Allowed source IP of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
allowed_subnetstring | Allowed subnet mask of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
wireguard/state
The current WireGuard state.
| Name | Description |
|---|---|
stateint | State of the connection to the WireGuard peer
|
connection_startint (ms) | Time in milliseconds when the last connection was established. |
connection_endint (ms) | Time in milliseconds when the last connection was disconnected. |
wireguard/config
The WireGuard configuration.
# $HOST e.g. wem-AbCd
Read
curl http://$HOST/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
curl http://$HOST/wireguard/config -d '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. wem/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
With MQTT on $PREFIX/wireguard/config_update
mosquitto_pub -h $BROKER -t $PREFIX/wireguard/config_update -m '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
| Name | Description |
|---|---|
enablebool | Indicates whether a WireGuard connection to the configured peer should be established.
|
make_default_interfacebool | Indicates whether all non-local network traffic should be routed through WireGuard.
|
internal_ipstring | IP address of the device in the WireGuard network |
internal_subnetstring | Subnet mask of the WireGuard network |
internal_gatewaystring | Gateway of the WireGuard network |
remote_hoststring | Public address or hostname of the peer to which a WireGuard connection should be established |
remote_portint | Port of the peer to which a WireGuard connection should be established |
local_portint | Port from which the WireGuard connection is established |
private_keystring | Private key of the device (44 Base64 characters or empty) |
remote_public_keystring | Public key of the peer to which a WireGuard connection should be established (44 Base64 characters or empty) |
preshared_keystring | Preshared key (PSK) of the connection between device and peer (44 Base64 characters or empty) |
allowed_ipstring | Allowed source IP of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
allowed_subnetstring | Allowed subnet mask of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
wireguard/state
The current WireGuard state.
| Name | Description |
|---|---|
stateint | State of the connection to the WireGuard peer
|
connection_startint (ms) | Time in milliseconds when the last connection was established. |
connection_endint (ms) | Time in milliseconds when the last connection was disconnected. |
wireguard/config
The WireGuard configuration.
# $HOST e.g. wem2-AbCd
Read
curl http://$HOST/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
curl http://$HOST/wireguard/config -d '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. wem2/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
With MQTT on $PREFIX/wireguard/config_update
mosquitto_pub -h $BROKER -t $PREFIX/wireguard/config_update -m '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
| Name | Description |
|---|---|
enablebool | Indicates whether a WireGuard connection to the configured peer should be established.
|
make_default_interfacebool | Indicates whether all non-local network traffic should be routed through WireGuard.
|
internal_ipstring | IP address of the device in the WireGuard network |
internal_subnetstring | Subnet mask of the WireGuard network |
internal_gatewaystring | Gateway of the WireGuard network |
remote_hoststring | Public address or hostname of the peer to which a WireGuard connection should be established |
remote_portint | Port of the peer to which a WireGuard connection should be established |
local_portint | Port from which the WireGuard connection is established |
private_keystring | Private key of the device (44 Base64 characters or empty) |
remote_public_keystring | Public key of the peer to which a WireGuard connection should be established (44 Base64 characters or empty) |
preshared_keystring | Preshared key (PSK) of the connection between device and peer (44 Base64 characters or empty) |
allowed_ipstring | Allowed source IP of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
allowed_subnetstring | Allowed subnet mask of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
wireguard/state
The current WireGuard state.
| Name | Description |
|---|---|
stateint | State of the connection to the WireGuard peer
|
connection_startint (ms) | Time in milliseconds when the last connection was established. |
connection_endint (ms) | Time in milliseconds when the last connection was disconnected. |
wireguard/config
The WireGuard configuration.
# $HOST e.g. warp-AbCd
Read
curl http://$HOST/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
curl http://$HOST/wireguard/config -d '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
# $BROKER e.g. my_mosquitto.localdomain
# $PREFIX e.g. warp/AbCd
Read
mosquitto_sub -v -C 1 -h $BROKER -t $PREFIX/wireguard/config
{
"enable": false,
"internal_ip": "",
"internal_subnet": "",
// Not returned
"private_key": null,
"remote_host": "",
"remote_port": 51820,
// Not returned
"remote_public_key": null,
"allowed_ip": "",
"allowed_subnet": ""
}
Write
With MQTT on $PREFIX/wireguard/config_update
mosquitto_pub -h $BROKER -t $PREFIX/wireguard/config_update -m '{
"enable": true,
"make_default_interface": true,
"internal_ip": "123.145.167.189",
"internal_subnet": "255.255.255.0",
"internal_gateway": "123.145.167.1",
"remote_host": "1.2.3.4",
"remote_port": 51820,
"local_port": 51820,
"private_key": "7aufw3iiQRVs9HyN8sGPeAHtVKVMVgV+bdRrql5S6ac=",
"remote_public_key": "VKKqmbJ97OTKbqCBszfUaa/H1Tzy7IO9f+TWhwH7m9o=",
"preshared_key": "tZtZ59nx5uIQma7phYTA4b8P28ogSzKHFC40izC6y4c=",
"allowed_ip": "0.0.0.0",
"allowed_subnet": "0.0.0.0"
}'
| Name | Description |
|---|---|
enablebool | Indicates whether a WireGuard connection to the configured peer should be established.
|
make_default_interfacebool | Indicates whether all non-local network traffic should be routed through WireGuard.
|
internal_ipstring | IP address of the device in the WireGuard network |
internal_subnetstring | Subnet mask of the WireGuard network |
internal_gatewaystring | Gateway of the WireGuard network |
remote_hoststring | Public address or hostname of the peer to which a WireGuard connection should be established |
remote_portint | Port of the peer to which a WireGuard connection should be established |
local_portint | Port from which the WireGuard connection is established |
private_keystring | Private key of the device (44 Base64 characters or empty) |
remote_public_keystring | Public key of the peer to which a WireGuard connection should be established (44 Base64 characters or empty) |
preshared_keystring | Preshared key (PSK) of the connection between device and peer (44 Base64 characters or empty) |
allowed_ipstring | Allowed source IP of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |
allowed_subnetstring | Allowed subnet mask of packets received over the WireGuard connection. 0.0.0.0 to process all received packets |