mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-22 22:59:09 +02:00
inject proxy policies on nmdata path
This commit is contained in:
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "A reverse-proxy service targeting a domain network resource. The synthesised proxy-access ACL is a resource policy too: on the account path the resource-policy map was built after injection, so the routing peer must carry a route firewall rule sourced from the proxy peer for the resource's domain. The store reads the policies table and ResourcePolicies never holds it, so only the synthesis puts it there.",
|
||||
"peers": [
|
||||
"router-peer",
|
||||
"proxy-peer"
|
||||
]
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"Network": {"Serial": 32},
|
||||
"AccountSettings": {"RoutingPeerDNSResolutionEnabled": true},
|
||||
"Peers": {
|
||||
"router-peer": {"IP": "100.64.0.9", "Meta": {"WtVersion": "0.60.0"}},
|
||||
"proxy-peer": {
|
||||
"IP": "100.64.0.99",
|
||||
"Meta": {"WtVersion": "0.60.0"},
|
||||
"ProxyMeta": {"Embedded": true, "Cluster": "eu.proxy.netbird.io"}
|
||||
}
|
||||
},
|
||||
"NetworkResources": [
|
||||
{
|
||||
"ID": "res-domain",
|
||||
"NetworkID": "net-1",
|
||||
"Name": "app-domain",
|
||||
"Type": "domain",
|
||||
"Domain": "app.internal",
|
||||
"Enabled": true
|
||||
}
|
||||
],
|
||||
"Routers": {
|
||||
"net-1": {
|
||||
"router-peer": {"PublicID": "router-direct", "Masquerade": true, "Metric": 9999, "Enabled": true}
|
||||
}
|
||||
},
|
||||
"ProxyTargetedDomainResourceIDs": {"res-domain": {}},
|
||||
"Services": [
|
||||
{
|
||||
"ID": "svc-1",
|
||||
"Enabled": true,
|
||||
"Mode": "http",
|
||||
"ProxyCluster": "eu.proxy.netbird.io",
|
||||
"Targets": [
|
||||
{
|
||||
"Enabled": true,
|
||||
"Protocol": "https",
|
||||
"TargetID": "res-domain",
|
||||
"TargetType": "domain"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "A reverse-proxy service targeting a peer. The proxy-access ACL is synthesised from Services, never loaded from the policies table, and is what lets the cluster's embedded proxy peer reach the target on the target's port: proxy-peer gets an OUT rule to app-peer on TCP 8080 and app-peer the matching IN rule. Without the synthesis both maps are empty of each other.",
|
||||
"peers": [
|
||||
"proxy-peer",
|
||||
"app-peer"
|
||||
]
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
{
|
||||
"Serial": "30",
|
||||
"peerConfig": {
|
||||
"address": "100.64.0.10/10",
|
||||
"sshConfig": {},
|
||||
"fqdn": "app-peer.netbird.test",
|
||||
"RoutingPeerDnsResolutionEnabled": true,
|
||||
"autoUpdate": {}
|
||||
},
|
||||
"remotePeers": [
|
||||
{
|
||||
"wgPubKey": "MgrwmZOHFZ+i0SXrfbBOcATxBAQsWKllrGL/32GvlxY=",
|
||||
"allowedIps": [
|
||||
"100.64.0.99/32"
|
||||
],
|
||||
"sshConfig": {},
|
||||
"fqdn": "proxy-peer.netbird.test",
|
||||
"agentVersion": "0.60.0"
|
||||
}
|
||||
],
|
||||
"DNSConfig": {
|
||||
"ServiceEnable": true,
|
||||
"CustomZones": [
|
||||
{
|
||||
"Domain": "netbird.test.",
|
||||
"Records": [
|
||||
{
|
||||
"Name": "app-peer.netbird.test",
|
||||
"Type": "1",
|
||||
"Class": "IN",
|
||||
"TTL": "300",
|
||||
"RData": "100.64.0.10"
|
||||
},
|
||||
{
|
||||
"Name": "proxy-peer.netbird.test",
|
||||
"Type": "1",
|
||||
"Class": "IN",
|
||||
"TTL": "300",
|
||||
"RData": "100.64.0.99"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ForwarderPort": "22054"
|
||||
},
|
||||
"FirewallRules": [
|
||||
{
|
||||
"PeerIP": "100.64.0.99",
|
||||
"Protocol": "TCP",
|
||||
"PortInfo": {
|
||||
"range": {
|
||||
"start": 8080,
|
||||
"end": 8080
|
||||
}
|
||||
},
|
||||
"PolicyID": "cHJveHktYWNjZXNzLXN2Yy0xLXByb3h5LXBlZXIt"
|
||||
}
|
||||
],
|
||||
"routesFirewallRulesIsEmpty": true,
|
||||
"sshAuth": {
|
||||
"UserIDClaim": "sub"
|
||||
}
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"Serial": "30",
|
||||
"peerConfig": {
|
||||
"address": "100.64.0.99/10",
|
||||
"sshConfig": {},
|
||||
"fqdn": "proxy-peer.netbird.test",
|
||||
"RoutingPeerDnsResolutionEnabled": true,
|
||||
"autoUpdate": {}
|
||||
},
|
||||
"remotePeers": [
|
||||
{
|
||||
"wgPubKey": "/wFxrqMtMwWNZak/f0UDddUkCZMTmxNuiuk4/RGGNcY=",
|
||||
"allowedIps": [
|
||||
"100.64.0.10/32"
|
||||
],
|
||||
"sshConfig": {},
|
||||
"fqdn": "app-peer.netbird.test",
|
||||
"agentVersion": "0.60.0"
|
||||
}
|
||||
],
|
||||
"DNSConfig": {
|
||||
"ServiceEnable": true,
|
||||
"CustomZones": [
|
||||
{
|
||||
"Domain": "netbird.test.",
|
||||
"Records": [
|
||||
{
|
||||
"Name": "app-peer.netbird.test",
|
||||
"Type": "1",
|
||||
"Class": "IN",
|
||||
"TTL": "300",
|
||||
"RData": "100.64.0.10"
|
||||
},
|
||||
{
|
||||
"Name": "proxy-peer.netbird.test",
|
||||
"Type": "1",
|
||||
"Class": "IN",
|
||||
"TTL": "300",
|
||||
"RData": "100.64.0.99"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"ForwarderPort": "22054"
|
||||
},
|
||||
"FirewallRules": [
|
||||
{
|
||||
"PeerIP": "100.64.0.10",
|
||||
"Direction": "OUT",
|
||||
"Protocol": "TCP",
|
||||
"PortInfo": {
|
||||
"range": {
|
||||
"start": 8080,
|
||||
"end": 8080
|
||||
}
|
||||
},
|
||||
"PolicyID": "cHJveHktYWNjZXNzLXN2Yy0xLXByb3h5LXBlZXIt"
|
||||
}
|
||||
],
|
||||
"routesFirewallRulesIsEmpty": true,
|
||||
"sshAuth": {
|
||||
"UserIDClaim": "sub"
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"Network": {"Serial": 30},
|
||||
"AccountSettings": {"RoutingPeerDNSResolutionEnabled": true},
|
||||
"Peers": {
|
||||
"proxy-peer": {
|
||||
"IP": "100.64.0.99",
|
||||
"Meta": {"WtVersion": "0.60.0"},
|
||||
"ProxyMeta": {"Embedded": true, "Cluster": "eu.proxy.netbird.io"}
|
||||
},
|
||||
"app-peer": {"IP": "100.64.0.10", "Meta": {"WtVersion": "0.60.0"}}
|
||||
},
|
||||
"Services": [
|
||||
{
|
||||
"ID": "svc-1",
|
||||
"Enabled": true,
|
||||
"Mode": "http",
|
||||
"ProxyCluster": "eu.proxy.netbird.io",
|
||||
"Targets": [
|
||||
{
|
||||
"Enabled": true,
|
||||
"Port": 8080,
|
||||
"Protocol": "http",
|
||||
"TargetID": "app-peer",
|
||||
"TargetType": "peer"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"description": "A private reverse-proxy service. The private-access ACL is synthesised from Services, never loaded from the policies table, and is what lets the service's AccessGroups reach the cluster's embedded proxy peer on TCP 80 and 443: user-peer gets OUT rules on both ports and proxy-peer the matching IN rules. Without the synthesis both maps are empty of each other.",
|
||||
"peers": [
|
||||
"user-peer",
|
||||
"proxy-peer"
|
||||
]
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"Network": {"Serial": 31},
|
||||
"AccountSettings": {"RoutingPeerDNSResolutionEnabled": true},
|
||||
"Peers": {
|
||||
"user-peer": {"IP": "100.64.0.10", "Meta": {"WtVersion": "0.60.0"}},
|
||||
"other-peer": {"IP": "100.64.0.11", "Meta": {"WtVersion": "0.60.0"}},
|
||||
"proxy-peer": {
|
||||
"IP": "100.64.0.99",
|
||||
"Meta": {"WtVersion": "0.60.0"},
|
||||
"ProxyMeta": {"Embedded": true, "Cluster": "eu.proxy.netbird.io"}
|
||||
}
|
||||
},
|
||||
"Groups": {
|
||||
"grp-admins": {"Peers": ["user-peer"]}
|
||||
},
|
||||
"Services": [
|
||||
{
|
||||
"ID": "svc-1",
|
||||
"Enabled": true,
|
||||
"Private": true,
|
||||
"Mode": "http",
|
||||
"ProxyCluster": "eu.proxy.netbird.io",
|
||||
"AccessGroups": ["grp-admins", "grp-deleted"]
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user