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

add network policy back with tweaks #86

Merged
merged 1 commit into from
Feb 29, 2024
Merged

add network policy back with tweaks #86

merged 1 commit into from
Feb 29, 2024

Conversation

jgilfoil
Copy link
Owner

the other policy only allows the vpn to connect out to the internet through the vpn.

the other policy only allows the vpn to connect out to the internet through the vpn.
Copy link

--- kubernetes/apps/network/vpn-gateway/app Kustomization: flux-system/vpn-gateway HelmRelease: network/vpn-gateway

+++ kubernetes/apps/network/vpn-gateway/app Kustomization: flux-system/vpn-gateway HelmRelease: network/vpn-gateway

@@ -21,13 +21,20 @@

   interval: 5m
   values:
     addons:
       netshoot:
         enabled: true
         networkPolicy:
-          enabled: false
+          egress:
+          - to:
+            - ipBlock:
+                cidr: 10.0.0.0/8
+          - to:
+            - ipBlock:
+                cidr: 192.168.1.0/24
+          enabled: true
         resources:
           limits:
             memory: 10M
           requests:
             cpu: 5m
             memory: 10M
@@ -87,16 +94,16 @@

         type: udp
       - port: 27071
         type: tcp
     routed_namespaces:
     - media
     settings:
-      NOT_ROUTED_TO_GATEWAY_CIDRS: 10.0.0.0/8 192.168.0.0/24
+      NOT_ROUTED_TO_GATEWAY_CIDRS: 10.0.0.0/8 10.96.0.0/16 192.168.0.0/24
       VPN_BLOCK_OTHER_TRAFFIC: true
       VPN_INTERFACE: wg0
-      VPN_LOCAL_CIDRS: 10.0.0.0/8 192.168.1.0/24
+      VPN_LOCAL_CIDRS: 10.69.0.0/16 10.96.0.0/16 192.168.1.0/24
       VPN_TRAFFIC_PORT: ${SECRET_VPN_GATEWAY_PORT}
     webhook:
       gatewayAnnotation: setGateway
       gatewayDefault: false
       gatewayLabel: setGateway
       image:

Copy link

--- HelmRelease: network/vpn-gateway ConfigMap: media/vpn-gateway-pod-gateway

+++ HelmRelease: network/vpn-gateway ConfigMap: media/vpn-gateway-pod-gateway

@@ -10,16 +10,16 @@

     app.kubernetes.io/managed-by: Helm
 data:
   settings.sh: |
     #!/bin/sh
     # Generated by vpn-gateway-pod-gateway
     DNS_LOCAL_CIDRS="local"
-    NOT_ROUTED_TO_GATEWAY_CIDRS="10.0.0.0/8 192.168.0.0/24"
+    NOT_ROUTED_TO_GATEWAY_CIDRS="10.0.0.0/8 10.96.0.0/16 192.168.0.0/24"
     VPN_BLOCK_OTHER_TRAFFIC="true"
     VPN_INTERFACE="wg0"
-    VPN_LOCAL_CIDRS="10.0.0.0/8 192.168.1.0/24"
+    VPN_LOCAL_CIDRS="10.69.0.0/16 10.96.0.0/16 192.168.1.0/24"
     VPN_TRAFFIC_PORT="${SECRET_VPN_GATEWAY_PORT}"
     VXLAN_GATEWAY_FIRST_DYNAMIC_IP="20"
     VXLAN_ID="42"
     VXLAN_IP_NETWORK="172.16.0"
   nat.conf: |
     # Generated by vpn-gateway-pod-gateway
--- HelmRelease: network/vpn-gateway ConfigMap: network/vpn-gateway-pod-gateway

+++ HelmRelease: network/vpn-gateway ConfigMap: network/vpn-gateway-pod-gateway

@@ -10,16 +10,16 @@

     app.kubernetes.io/managed-by: Helm
 data:
   settings.sh: |
     #!/bin/sh
     # Generated by vpn-gateway-pod-gateway
     DNS_LOCAL_CIDRS="local"
-    NOT_ROUTED_TO_GATEWAY_CIDRS="10.0.0.0/8 192.168.0.0/24"
+    NOT_ROUTED_TO_GATEWAY_CIDRS="10.0.0.0/8 10.96.0.0/16 192.168.0.0/24"
     VPN_BLOCK_OTHER_TRAFFIC="true"
     VPN_INTERFACE="wg0"
-    VPN_LOCAL_CIDRS="10.0.0.0/8 192.168.1.0/24"
+    VPN_LOCAL_CIDRS="10.69.0.0/16 10.96.0.0/16 192.168.1.0/24"
     VPN_TRAFFIC_PORT="${SECRET_VPN_GATEWAY_PORT}"
     VXLAN_GATEWAY_FIRST_DYNAMIC_IP="20"
     VXLAN_ID="42"
     VXLAN_IP_NETWORK="172.16.0"
   nat.conf: |
     # Generated by vpn-gateway-pod-gateway

@jgilfoil jgilfoil merged commit 1e38149 into main Feb 29, 2024
5 checks passed
@jgilfoil jgilfoil deleted the feature/vpn branch February 29, 2024 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant