Commit graph

684 commits

Author SHA1 Message Date
Matthew R. Kasun 319193c18a update IsIPUnique
also:
 - remove unnecessary call to UpertHost in create node
 - remove debugging logs
2022-12-23 18:06:59 -05:00
dcarns afc1812ef3
Merge pull request #1870 from gravitl/story/GRA-793
Add default hosts to network upon creation
2022-12-23 17:09:03 -05:00
Matthew R. Kasun f5db3fd853 refactor of peerUpdate
contains some debugging logging
2022-12-23 16:12:45 -05:00
Matthew R Kasun a371b7ae21
Merge branch 'netclient_refactor_latest' into GRA-824-getPeerUpdate 2022-12-23 15:59:55 -05:00
0xdcarns 2b3747cc33 added function to get default hosts 2022-12-23 15:56:33 -05:00
0xdcarns 8058640cdf change local address and join create func 2022-12-23 14:22:34 -05:00
0xdcarns ad2934a8fc remove allowed ips and local address 2022-12-23 14:07:16 -05:00
0xdcarns 368d01ff10 removed localaddress 2022-12-23 14:06:39 -05:00
Matthew R. Kasun eae92470c5 refactor of peerUpdate
contains some debugging logging
2022-12-23 13:41:17 -05:00
0xdcarns df614d6d4f added associate and dissasociate functions 2022-12-23 13:03:33 -05:00
0xdcarns 5f5f8be5d5 created functions 2022-12-23 12:38:22 -05:00
0xdcarns 309cfff577 updated controllers to use conversion routines 2022-12-22 15:44:42 -05:00
dcarns 7328fbd351
Merge pull request #1849 from gravitl/fix_peer_errors
fix compile errors
2022-12-22 08:49:08 -05:00
Matthew R. Kasun bce2f8a45c fix compile errors 2022-12-22 06:42:33 -05:00
Matthew R. Kasun 1a4fa60bdf comment for public var 2022-12-21 16:15:00 -05:00
dcarns 54691d94cf
Merge pull request #1843 from gravitl/GRA-824-refactor-join
set mask on address sent to node
2022-12-21 15:01:13 -05:00
Matthew R Kasun 996a08ba93
Merge branch 'netclient_refactor_latest' into GRA-824-save-hostpass 2022-12-21 14:45:18 -05:00
Matthew R. Kasun bc47ef4868 encrypt and save hostpass on HostCreate 2022-12-21 14:43:46 -05:00
Matthew R. Kasun b07504c286 fix logic 2022-12-21 13:01:32 -05:00
Matthew R. Kasun 3baf5fb6fd reorder brackets 2022-12-21 12:54:52 -05:00
Matthew R. Kasun 72cce05ae6 missing bracket 2022-12-21 12:51:21 -05:00
dcarns f3d9840824
Merge pull request #1840 from walkerwmanuel/story/GRA-825
Refactored user functions to use references rather than values
2022-12-21 12:19:18 -05:00
Matthew R. Kasun b51ee38db5 set mask on address sent to node 2022-12-21 12:04:06 -05:00
dcarns 6e05834399
Merge pull request #1841 from gravitl/GRA-824-refactor-join
Gra 824 refactor join
2022-12-21 10:05:39 -05:00
Matthew R. Kasun 23590a1d4a fix panic set node defaults for non dualstack network 2022-12-21 06:50:51 -05:00
Matthew R. Kasun 9c8331e6b8 add validation function for defaultacl 2022-12-21 06:40:43 -05:00
Matthew R. Kasun 770a293049 new constant for wireguard interface name 2022-12-21 03:31:37 -05:00
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
walkerwmanuel 71d66b7f93 Refactored user functions to use refrences rather than values 2022-12-20 15:10:40 -05:00
0xdcarns ae1b2e0e3f added sort before peer update 2022-12-20 11:50:58 -05:00
0xdcarns 9188dd2cdf initial commit 2022-12-19 18:04:55 -05:00
Matthew R. Kasun c086e9499d rebase
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-12-19 15:15:35 -05:00
0xdcarns cc529ab3bd finished initial crud for hosts, fixed stun server close bug 2022-12-19 14:55:24 -05:00
0xdcarns 8584699944 fixed bugs around user update & user delete false error with no nets 2022-12-14 16:26:18 -05:00
Abhishek Kondur 96598e0f1d remove commented code 2022-12-13 17:36:36 +05:30
dcarns ff19476ac8
Merge pull request #1808 from gravitl/bugfix_v0.17.1_ee_users_GRA-734
fixed ee user pwd change err, fixed ee license free tier limit err
2022-12-12 14:46:16 -05:00
Abhishek Kondur 759b9bc6cd rm ext cidr 2022-12-13 01:14:28 +05:30
Abhishek Kondur 07dd20734d extclients internal ips 2022-12-12 22:49:35 +05:30
Abhishek Kondur 83dfa1f920 add proxy listen port to peer config 2022-12-12 10:49:11 +05:30
Abhishek Kondur 8fc09fd5cd fix stun port format,use proxy listen port from node model 2022-12-12 10:33:35 +05:30
Abhishek Kondur 0b8257f0d7 fix models change, merge conflicts resolved 2022-12-12 08:50:28 +05:30
0xdcarns 8b49ea7fa5 fixed ee user pwd change err, fixed ee license free tier limit err 2022-12-09 14:20:00 -05:00
Abhishek Kondur e00199a650 update proxy pkg path 2022-12-09 00:54:11 +05:30
Abhishek Kondur d8075e69c6 add alias internal ip to ext clients 2022-12-08 19:48:47 +05:30
Abhishek Kondur 7f5e1a141f store proxy metrics in the server 2022-12-08 14:20:50 +05:30
Abhishek Kondur 728c24c16a avoid getting relay allowed ips if node is using proxy 2022-12-07 17:22:17 +05:30
kayos@tcp.direct c074d6e2ae
Fix: ignoring of returned error value 2022-12-07 00:28:06 -08:00
kayos@tcp.direct e878e4820a
Fixes+Chores: avoid de-referencing nil ptrs + lint
- Avoid referencing conditions we know are false/true

 - Avoid using name of imported package as variable

 - Avoid broken (see list item 1) if else statement in `ipservice.go` by refactoring to switch statement

 - When assigning a pointer value to a variable along with an error, check that error before referencing that pointer. Thus avoiding de-referencing a nil and causing a panic.
  *** This item is the most important ***

 - Standard gofmt package sorting + linting; This includes fixing comment starts for go doc

 - Explicit non-handling of unhandled errors where appropriate (assigning errs to _ to reduce linter screaming)

 - Export ErrExpired in `netcache` package so that we can properly reference it using `errors.Is` instead of using `strings.Contains` against an `error.Error()` value
2022-12-06 20:11:20 -08:00
Abhishek Kondur 80c7d46ec6 docker compose update, add stun to caddyfile 2022-12-06 19:27:38 +05:30
Abhishek Kondur 4b1a85a3ee proxy changes 2022-12-02 17:35:41 +05:30
Abhishek Kondur 5b7ead91e6 merge conflicts resolved 2022-12-02 10:08:01 +05:30
Abhishek Kondur cff3508425 Merge branch 'develop' of https://github.com/gravitl/netmaker into feature_proxy_metrics 2022-12-01 19:31:56 +05:30
Matthew R. Kasun 407c6ed20a fix error from branch create 2022-11-29 10:11:47 -05:00
Anish Mukherjee 0dcc54dc49 fix ipv6 addressing bug 2022-11-29 10:11:47 -05:00
0xdcarns 31990fca45 fixed admin issue and potential panics 2022-11-29 10:11:47 -05:00
0xdcarns b7ae6c6d35 moved ee check out of ce 2022-11-29 10:11:47 -05:00
tt2468 c9d5a44a0e Add missing line ending in ingress postUp command
Adds a missing line ending in the postUp masquerade command. This missing line is sneaky, and only seems to pose an issue when both ingress and egress modes are enabled.
2022-11-29 10:11:47 -05:00
Matthew R. Kasun fbd905a91a fix finger problem (missing } 2022-11-29 10:11:47 -05:00
Matthew R. Kasun 50a1c3a018 changed verbosity for zombie checking log message 2022-11-29 09:42:46 -05:00
Abhishek Kondur 972ded5a2d change listen port to proxy on ext client creation if proxy used on ingress GW 2022-11-27 22:22:54 +05:30
Abhishek Kondur 015bd5d366 add wg address to proxy payload 2022-11-21 10:09:49 +05:30
Abhishek Kondur 968f91edb4 fetch ext peerts only for ingress gw 2022-11-21 10:02:33 +05:30
Abhishek Kondur 40a9ae0e76 return after pushing proxy updateto server 2022-11-20 15:10:20 +05:30
Abhishek Kondur f95306ddbd make proxy optional 2022-11-20 09:35:29 +05:30
Abhishek Kondur c54080e150 fix relay updates for proxy 2022-11-18 10:48:28 +05:30
Abhishek Kondur 653b5f21d6 configure proxy on peer update without resetting 2022-11-17 16:51:27 +05:30
Anish Mukherjee f42c784e64 fix ipv6 addressing bug 2022-11-16 18:10:09 +05:30
Matthew R. Kasun 4df672de68 refactor node deletion 2022-11-15 09:52:17 -05:00
Abhishek Kondur 7d166ac14a add ext client only on ingress node 2022-11-15 18:37:58 +05:30
Abhishek Kondur 4b9f68da8f set ingress node 2022-11-15 16:24:58 +05:30
Abhishek Kondur 4f76cc3ac3 forward unknown pkts to all interfaces 2022-11-15 09:31:31 +05:30
Matthew R. Kasun b453897e65 ensure netclient version is compatible 2022-11-14 14:41:34 -05:00
Abhishek Kondur 0a17a0744b configure proxy for ext clients 2022-11-14 14:10:52 +05:30
0xdcarns ea854a6b98 fixed admin issue and potential panics 2022-11-10 14:54:53 -05:00
0xdcarns f236686beb moved ee check out of ce 2022-11-09 14:35:26 -05:00
Abhishek Kondur 5d7bf9502b configure proxy for ext clients 2022-11-09 08:46:16 +05:30
Abhishek Kondur ce5e7bee4a route inbound packets to relayed node 2022-11-07 10:44:14 +05:30
Abhishek Kondur a7c0abe2fc refactor proxy updates 2022-11-07 01:25:04 +05:30
dcarns 42ffa2be32
Merge pull request #1672 from tt2468/bugfix_v0.16.1_ingress-egress-error
Fix netclient breaking when both ingress and egress modes are enabled
2022-11-04 10:00:39 -04:00
Abhishek Kondur acae6c3aed added relay functionality to proxy 2022-11-04 01:24:48 +05:30
Matthew R. Kasun 3d80c6ea62 set node.HostID on server node creation 2022-11-02 13:51:06 -04:00
Matthew R. Kasun 482246477c fix error from branch create 2022-11-02 10:59:31 -04:00
Abhishek Kondur 17e05d430b sync peers updates with proxy 2022-11-02 15:33:42 +05:30
Abhishek Kondur 474bd14e36 configure proxy on node updates 2022-10-31 10:32:04 +05:30
Abhishek Kondur 31a7e73473 add proxy to netmaker server 2022-10-28 17:02:22 +05:30
Matthew R. Kasun 344fb80dc3 fix finger problem (missing } 2022-10-26 10:32:34 -04:00
Matthew R. Kasun c384e9dc4d don't skip peer if endpoint is the same
and can not set endpoint to localaddress
2022-10-26 10:23:22 -04:00
tt2468 b38061480e
Add missing line ending in ingress postUp command
Adds a missing line ending in the postUp masquerade command. This missing line is sneaky, and only seems to pose an issue when both ingress and egress modes are enabled.
2022-10-18 22:56:42 -07:00
dcarns ebbc057b58
Merge pull request #1657 from gravitl/bugfix_v0.16.2_client_metrics
adjusted check for clients on non servers
2022-10-17 11:21:24 -04:00
Matthew R. Kasun e65d1cf600 maintain server listen port on failover/ingress deletion 2022-10-17 11:04:17 -04:00
0xdcarns e6d956c8a5 adjusted check for clients on non servers 2022-10-14 12:15:01 -04:00
Alex Feiszli 4a9e5580fa
Merge pull request #1651 from gravitl/feature_v0.16.2_client_metrics
Feature v0.16.2 client metrics
2022-10-14 09:43:13 -04:00
0xdcarns b736ff9224 adjusted time for lengthier server metrics 2022-10-12 13:08:39 -04:00
Alex Feiszli 22c741bd51
Merge pull request #1629 from gravitl/bugfix_0.16.2_zombies
re-enable zombie processing
2022-10-11 16:42:47 -04:00
0xdcarns 13c3b564a1 rough draft 2022-10-11 15:30:55 -04:00
0xdcarns b7a24b98ba added controller for ext client metrics and logic for ingress server 2022-10-11 14:13:17 -04:00
Matthew R. Kasun faebdce277 add logs when adding nodes to zombie list 2022-10-11 10:26:11 -04:00
Matthew R Kasun c254e0af85
Merge pull request #1634 from gravitl/bugfix_mq_dyn_sec
node disconnect/connect fix, delete node api fix
2022-10-05 22:33:03 -04:00
Abhishek Kondur b3df6d1a68 check for empty record 2022-10-06 00:58:13 +05:30
Matthew R. Kasun fa2ad00de9 add check to create egress as well 2022-10-05 13:49:15 -04:00
Matthew R. Kasun 643714799e ipv6 ingress not supported on server 2022-10-05 13:30:27 -04:00
Matthew R Kasun b6417796c5 re-enable zombie processing 2022-10-03 20:27:09 +00:00
Alex Feiszli 8ac1692490
Merge pull request #1609 from gravitl/bugfix_v0.16.1_egress_relay
add egress range to allowed ips if relay of relayed node is egress ga…
2022-10-03 09:08:46 -04:00
Alex Feiszli c46ddeddc7
Merge pull request #1607 from gravitl/bugfix_v0.16.1_ingress-egress
Bugfix v0.16.1 ingress egress
2022-10-03 09:06:25 -04:00
Alex Feiszli 6890ca70b9
Merge pull request #1622 from gravitl/feature_mq_dynsec
MQ Dynamic Security
2022-10-03 09:05:32 -04:00
Abhishek Kondur acd7a70b77 PR comments resolved 2022-10-01 06:27:30 +05:30
cameronts b9797641e3
Merge pull request #1618 from gravitl/feature_v0.16.1_telemetryeeandfree
Add telemetry for EE and FreeTier flags
2022-09-30 13:45:25 -07:00
Abhishek Kondur 1827f8c3b5 merge conflicts resolved 2022-09-30 20:15:17 +05:30
Abhishek Kondur 0df6d1761e add subscription pattern to acls,fix NaN value in metrics for uptime,get real iface name for mac 2022-09-30 18:31:57 +05:30
cameronts c97d6cfd66 Add telemetry for EE and FreeTier flags 2022-09-29 15:40:10 -07:00
afeiszli c8672818fe adding resets and single peer update on metrics disconnect detections 2022-09-29 14:49:44 -04:00
0xdcarns f2606dd3cb addressed PR comments 2022-09-29 09:49:06 -04:00
0xdcarns eb75a6829c added wipe failover cases and ceased node update on metrics update 2022-09-28 16:17:49 -04:00
0xdcarns 4f7583e2ec add peers if no failover present 2022-09-28 15:49:02 -04:00
0xdcarns 40f7036093 fixed first two issues 2022-09-28 15:22:12 -04:00
0xdcarns b95f3eb846 initial PoC completed 2022-09-28 14:59:21 -04:00
0xdcarns 75fc15ac4c commented out logic 2022-09-28 13:05:41 -04:00
0xdcarns a1ec5fb354 fixed non ping err resulting in connected 2022-09-28 11:31:20 -04:00
afeiszli 78bacce528 add ability to reset failover 2022-09-27 14:42:14 -04:00
Matthew R. Kasun be3be45981 add egress range to allowed ips if relay of relayed node is egress gateway 2022-09-27 14:39:29 -04:00
afeiszli 54258bcbac add ability to set failover nodes 2022-09-27 14:04:28 -04:00
afeiszli 29ce2fa57a refactor failover logic to set per-peer. Uses Ingress Gateway logic instead of Relay logic 2022-09-27 13:59:49 -04:00
0xdcarns 40b52a6ed9 add wg device for metrics if ICMP fails 2022-09-27 10:30:01 -04:00
0xdcarns d565dbeaf8 initial logic for failover 2022-09-27 10:30:01 -04:00
Abhishek Kondur 878430bf75 create client for nodes on authenticate,generate dyn sec file on startup 2022-09-27 17:36:33 +05:30
Matthew R. Kasun 24f78b172e eliminate extra ; when creating ingress followed by egress 2022-09-26 14:05:51 -04:00
Abhishek Kondur 649d8ee625 rm Is_EE from pkg logic 2022-09-26 18:12:01 +05:30
Abhishek Kondur faf7addcf5 Merge branch 'bugfix_v0.16.1_ee_checks' of https://github.com/gravitl/netmaker into feature_dyn_sec_latest 2022-09-26 18:09:34 +05:30
Abhishek Kondur f632bec11d merge conflicts resolved 2022-09-26 17:47:20 +05:30
Abhishek Kondur f509dffabb increase password key gen to len 64 2022-09-26 16:56:13 +05:30
Matthew R. Kasun 5f7d6ea1ef logic.Is_EE --> systemcfg.Is_EE 2022-09-25 07:11:26 -04:00
Alex Feiszli f35429f768
Merge pull request #1596 from gravitl/feature_v0.16.1_ee_check
ee check
2022-09-23 15:29:30 -04:00
Matthew R. Kasun 175bb94471 additional checks for disconnected nodes 2022-09-22 15:22:21 -04:00
Matthew R. Kasun ee64e9e282 move IS_EE from logic to servercfg 2022-09-22 15:01:59 -04:00
Matthew R. Kasun 4df9bc098b add timeout to metrics pinger 2022-09-21 07:32:32 -04:00
afeiszli 1723f57035 fixing flags and config 2022-09-20 11:50:15 -04:00
afeiszli def1487bcf fix default acl 2022-09-19 16:20:58 -04:00
0xdcarns f5a20ffcca fixed default node acl logic 2022-09-16 14:28:00 -04:00
Alex Feiszli 758e6a8378
Merge branch 'develop' into feature_v0.16.0_ee_update 2022-09-14 16:33:44 -04:00
afeiszli 42f0af85b6 set networkuser access level 2022-09-14 15:33:26 -04:00
afeiszli 255e400be8 set NetworkUser defaults 2022-09-14 15:08:38 -04:00
afeiszli b5a3ad7dbd add * to allowed groups by default 2022-09-14 14:33:08 -04:00
afeiszli b670755cce refactoring for ee 2022-09-14 13:26:31 -04:00
afeiszli 8a1ba674a7 ee fixes 2022-09-14 09:58:01 -04:00
afeiszli e340b49aa8 set nil settings 2022-09-13 17:03:17 -04:00
afeiszli 51bc7c2272 remove bad log 2022-09-13 16:42:28 -04:00
afeiszli 96772bb4bd network and ACL initialization 2022-09-13 15:41:23 -04:00
0xdcarns 88cd0a6497 initial commit 2022-09-13 15:25:56 -04:00
Matthew R. Kasun f47d89ef62 remove unnecessary nft rule 2022-09-13 13:56:47 -04:00
Matthew R. Kasun e4761ef21b add check in nft rules for dual stack internet gateway 2022-09-12 15:11:19 -04:00