Commit graph

62 commits

Author SHA1 Message Date
abhishek9686
502a15ea14 ignore setting up rules when default poliy is enabled 2024-10-27 23:00:36 +04:00
abhishek9686
f51f655f00 send peer updates on user updates and ingress gw 2024-10-23 22:30:36 +04:00
abhishek9686
d4da1774ff check default user policy 2024-10-23 15:29:47 +04:00
abhishek9686
c0f107b302 remove userips usage, add allow all to fwupdate 2024-10-23 14:15:13 +04:00
abhishek9686
ffb75fa6c1 add allow rules for nodes 2024-10-23 13:19:16 +04:00
abhishek9686
6c52b68214 fix ingress firewall updates 2024-10-22 19:54:23 +04:00
abhishek9686
1c9b986f0e add static node ips in the ingress update 2024-10-21 19:48:13 +04:00
abhishek9686
3994183fe8 implement extclient to extclient acls 2024-10-21 16:49:30 +04:00
abhishek9686
7fa6580103 add ingress rules to peer update 2024-10-21 12:35:10 +04:00
abhishek9686
aea26dfdf6 check acl policy on ext client 2024-10-18 11:21:32 +04:00
abhishek9686
de7cabacba update tags on extclient update call 2024-10-17 19:55:58 +04:00
abhishek9686
b41353b415 add static nodes to api resp 2024-10-14 16:36:25 +04:00
abhishek9686
287bcd8abc static node init 2024-10-02 15:43:01 +04:00
Max Ma
46b8fd21c8
NET-1440: scale test changes (#3014)
* NET-1440 scale test changes

* fix UT error and add error info

* load metric data into cacha in startup

* remove debug info for metric

* add server telemetry and hasSuperAdmin to cache

* fix user UT case

* update sqlite connection string for performance

* update check-in TS in cache only if cache enabled

* update metric data in cache only if cache enabled and write to DB once in stop

* update server status in mq topic

* add failover existed to server status update

* only send mq messsage when there is server status change

* batch peerUpdate

* code changes for scale for review

* update UT case

* update mq client check

* mq connection code change

* revert server status update changes

* revert batch peerUpdate

* remove server status update info

* code changes based on review and setupmqtt in keepalive

* set the mq message order to false for PIN

* remove setupmqtt in keepalive

* recycle ip in node deletion

* update ip allocation logic

* remove ip addr cap

* remove ippool file

* update get extClient func

* remove ip from cache map when extClient is removed
2024-08-15 11:59:00 +05:30
Max Ma
0180481ddb fix egressing exclient set route issue 2024-06-03 19:41:13 +02:00
Abhishek K
7ff30599ed
NET-1252: Restrict inetGws, Relays from getting failedOver (#2937)
* add additional checks to avoid failovers

* add failover defence check on signal handler

* only add check for victim node

* avoid failover reset on pull

* add relayed for failoverme

* misc changes for failover

* remove resetfailoverpeers for InetNode

* add egress route back to allowedip list if relayed is egressGW

* add extclient back to allowedip list if peer is ingressGW

* reset failover on pull

---------

Co-authored-by: Max Ma <mayabin@gmail.com>
2024-06-03 10:49:02 +04:00
Max Ma
6dc881260f
NET-1224:add egressGW ip for setroutes (#2933)
* add egressGW ip for setroutes

* fix peer endpoint selection

---------

Co-authored-by: abhishek9686 <abhi281342@gmail.com>
2024-05-14 19:56:24 +05:30
Max Ma
1ad837ad72
NET-1164:PublishDeletedClientPeerUpdate when deleting user from RAGW (#2912)
* PublishDeletedClientPeerUpdate when deleting user from RAGW

* update ACLs after extClient is removed
2024-05-03 12:25:38 +05:30
Aceix
39fbb45cfe
feat(NET-817): add postup/down scripts for clients (#2810) 2024-02-08 23:29:43 +05:30
abhishek9686
2e5519c388 add extra allowed ips of other extclients 2024-01-17 22:18:43 +05:30
Abhishek K
9f1b722c19
NET-822: Add extra data for RAC gws resp (#2732)
* add extclient allowed ips to rac resp

* add gw peer public key

* fix static check
2023-12-13 17:30:43 +04:00
Abhishek K
2c4a27c53b
NET-735: HA Support (#2701)
* cache enabled option, cache hosts data if only enabled

* cache nodes only when enabled

* cache extclients only when enabled

* cache acls only when enabled
2023-12-05 12:01:35 +04:00
Abhishek Kondur
a41fcb5faa initalize extraallowed ips field 2023-11-27 12:24:31 +04:00
Abhishek Kondur
b3ec58a929 add extraclient egress routes 2023-11-27 10:16:18 +04:00
Abhishek Kondur
fceae8f93a move code to extpeers 2023-11-24 19:29:43 +04:00
Abhishek Kondur
9a58c1237e extraAllowedIps fix for ext clients 2023-11-24 15:17:27 +04:00
Abhishek K
7169db78ea
NET-717: DNS Fixes (#2654)
* send dns with complete entry name

* publish dns records on adding host to network from UI

* publish node dns updates when host is removed
2023-11-08 17:43:41 +04:00
Abhishek K
800f6e2222
fix extclient caching (#2653) 2023-11-01 23:36:46 +04:00
Aceix
bfc61fa359
session management for remote access client (#2592)
* feat(NET-584): wip: session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): session mgmt for RAC

* feat(NET-584): only enable if client is disabled

* feat(NET-584): check only for normal users

* feat(NET-584): fix condition
2023-10-02 08:57:58 +04:00
Farukh Khan
7c4870e82f
NET-600 (#2571)
* NET-600

* Ext clients dns now properly set from ingress dns value provided that the individual ext client dns are not present.

* NET-468 & NET-600

* When individual extclient dns is changed or removed, it reflects on the UI properly and also gets updated on backend.
2023-09-18 09:58:04 +02:00
Matthew R Kasun
0c70c4daba
enforce unique names for ext client names (#2476)
* enforce unique names for ext client names

* only check for unique id on creation

* check for unique id if changed
2023-08-01 20:20:43 +05:30
Gabriel de Souza Seibel
7e8b66e03d
[NET-353] Solve race condition with "unique" ips (#2461)
* Use a lock for getting unique ips

* Make getting & setting unique ips atomic

* Remove some blank lines

* Set addressLock to &sync.Mutex on declaration
2023-07-27 11:34:15 +05:30
Aceix
f4a5520f86
Kwesi/net 326 bug client ac ls (#2462)
* feat(NET-326): return 200 [] instead of 500 when there are not network acls

* fix(NET-326): implement allow/deny client acl functions

* fix(NET-326): implement extclient acl update

* fix(NET-326): kame fixes, send peer updates
2023-07-26 10:32:54 +05:30
Abhishek Kondur
845bb33c68 unlock mutex 2023-06-27 21:31:04 +05:30
Abhishek Kondur
50e093b456 cache ext clients 2023-06-27 20:48:53 +05:30
Abhishek Kondur
4071bb2bac db cache nodes and hosts 2023-06-27 16:10:04 +05:30
Matthew R Kasun
78640f1342
Extclient NET-63x (#2286)
* model changes

* additional fields for extclient create

* add DNS to extclient config

* extclient name checks

* update extclient

* nmctl extclient

* final tweaks

* review comments

* add extclientdns to node on ingress creation

* fix to add ingress dns to api (#2296)

---------

Co-authored-by: Aceix <aceixsmartX@gmail.com>
2023-05-17 10:58:03 -04:00
0xdcarns
b31b1cba7e keep keys if not changed 2023-04-05 12:06:15 -04:00
Matthew R Kasun
72ff3fe033 keep all values when updating extcient name 2023-03-28 15:12:09 -04:00
Matthew R Kasun
60e340cf1b update of extclient name
regenerate wg keys
2023-03-28 10:12:05 -04:00
0xdcarns
0f3faceb93 added logic for ext client ACLs 2023-03-14 13:39:33 -04:00
0xdcarns
55b24c5eeb allowed public key input for ext clients 2023-03-06 15:54:50 -05:00
Abhishek Kondur
051f60343b reset ingress to older way 2023-01-25 15:35:45 +04:00
Abhishek Kondur
19de1087ce rm debug log 2023-01-13 19:14:34 +05:30
Abhishek Kondur
e9dd9ac0a4 fix fetching uniqueIp 2023-01-13 19:11:40 +05:30
Abhishek Kondur
f129316bfe get extclient allowed ips for ingressGw peer 2023-01-13 10:13:45 +05:30
Matthew R. Kasun
38cd4d7700 refactor join
also removes server node
suspect there may be issues with proxy
and UI interactions with nodes
2022-12-20 15:29:09 -05:00
Matthew R. Kasun
c086e9499d rebase
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-12-19 15:15:35 -05:00
Abhishek Kondur
07dd20734d extclients internal ips 2022-12-12 22:49:35 +05:30
0xdcarns
88cd0a6497 initial commit 2022-09-13 15:25:56 -04:00