Commit graph

486 commits

Author SHA1 Message Date
afeiszli 3fca11c1df add udp port for relay 2022-06-15 14:29:25 -04:00
afeiszli c383ec0747 updating relay logic to remove udp 2022-06-15 12:05:55 -04:00
afeiszli d3a6faa90d updating route setting logic 2022-06-15 11:18:49 -04:00
afeiszli cd78a7c902 fixing index panic 2022-06-15 09:18:38 -04:00
afeiszli ba687dc504 remove redundant if 2022-06-15 08:46:58 -04:00
afeiszli b24691193f adding server/relay check for endpoint 2022-06-15 08:45:11 -04:00
afeiszli f632f043fe adding check for relay 2022-06-14 16:48:39 -04:00
afeiszli da8bafc35f adding back in relay check 2022-06-14 16:37:28 -04:00
Matthew R Kasun 9643e34475 Merge branch 'develop' of github.com:gravitl/netmaker into develop 2022-06-14 19:40:07 +00:00
Matthew R Kasun 27253d504b fix missing peer from relay 2022-06-14 19:39:59 +00:00
afeiszli 6fe58014cd adding locallistenport and udp hole punching 2022-06-14 15:01:53 -04:00
Matthew R Kasun 72799caa42 code review fixes 2022-06-14 15:30:22 +00:00
Matthew R Kasun 34263a6e2f refactor peer calculations 2022-06-14 14:36:30 +00:00
Matthew R. Kasun b280f39908 code review changes 2022-06-14 13:56:54 +00:00
Matthew R. Kasun 77a629dff1 code review changes 2022-06-14 13:56:54 +00:00
Matthew R. Kasun 236ada91bc skip yourself when checking zombies 2022-06-14 13:56:54 +00:00
Matthew R. Kasun cce7e30aeb only check for zombies on same network 2022-06-14 13:56:54 +00:00
dcarns 63a8abf5cc
Merge pull request #1203 from gravitl/bugfix_v0.14.3_relay
update relay when relayed address updated
2022-06-13 17:36:22 -04:00
Matthew R. Kasun 79e093124a code review changes 2022-06-13 16:06:00 -04:00
Matthew R. Kasun cb0635f0ee update relay when relayed address updated 2022-06-13 11:40:14 -04:00
dcarns e657c2c717
Merge pull request #1201 from gravitl/bugfix_v0.14.3_relay
IsRelayed off on relayed node when deleting relay
2022-06-13 11:11:39 -04:00
Matthew R. Kasun 7701aead2c code review changes 2022-06-13 09:34:25 -04:00
Matthew R. Kasun 24c58913eb IsRelayed off on relayed node when deleting relay
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-06-11 08:52:40 -04:00
afeiszli 9ad3e980e5 removing typo 2022-06-09 09:23:23 -04:00
afeiszli 5d4cd31366 reversing logic 2022-06-08 14:56:28 -04:00
Matthew R. Kasun cefc3e608b delete extclients when node is deleted 2022-06-07 16:31:25 -04:00
Matthew R. Kasun d418f2d65f use booleans 2022-06-07 15:17:04 -04:00
Matthew R. Kasun c2e22926a4 do not permit uppercase in Network names 2022-06-06 17:28:00 -04:00
afeiszli 9d78624edc fixing relay logic 2022-06-01 10:17:46 -04:00
afeiszli cdf2c60a1c more comments on peer logic 2022-05-31 16:33:42 -04:00
afeiszli 9e00a00bda GetPeers comments 2022-05-31 16:11:58 -04:00
Alex Feiszli 298aa8b779
Merge pull request #1148 from gravitl/feature_v0.14.2_brokeraddr
changing broker retrieval/setting logic
2022-05-31 14:44:54 -04:00
afeiszli 8d422526b3 refactoring servercfg 2022-05-31 12:07:56 -04:00
afeiszli 0865a535c7 changing broker retrieval/setting logic 2022-05-30 12:39:33 -04:00
afeiszli 8694295dc4 fixing timer logic 2022-05-28 10:23:32 -04:00
afeiszli 709ecd8cfe fixing ip check 2022-05-27 10:52:47 -04:00
Matthew R. Kasun 62b8b9bb8e update routes to use iplib 2022-05-26 17:39:18 -04:00
Matthew R. Kasun ef298fa343 update peers to use iplib 2022-05-26 16:28:08 -04:00
Matthew R. Kasun c37fa49096 switch to smaller ip lib 2022-05-26 16:14:52 -04:00
Matthew R. Kasun fef31752bd send server version in peer update message 2022-05-25 15:21:22 -04:00
afeiszli 3f038ab951 isStatic now only represents whether the Endpoint var is static 2022-05-23 15:24:09 -04:00
afeiszli d63bae351d fixing rangeupdate for ipv6, setting ipv4 assignment 2022-05-12 19:35:46 -04:00
0xdcarns 2de7beb31e added nil checks, handled empty map 2022-05-11 12:07:06 -04:00
0xdcarns e7f9310b3d added length checks as temp solution 2022-05-10 15:18:29 -04:00
dcarns 184ef00d63
Merge pull request #1072 from sullrich/patch-1
Add FreeBSD egress support
2022-05-10 09:12:30 -04:00
0xdcarns d1101ffe3a reworked dns to propogate all entries regardless 2022-05-09 11:17:16 -04:00
Scott Ullrich 360a13312a
Update gateway.go
* Add support for FreeBSD egress
* Make Post up and down commands a bit more readable
2022-05-08 13:37:22 -04:00
afeiszli 80cc86783d fixing ipv6 2022-05-02 10:48:00 -04:00
Alex Feiszli 726e5e1388
Merge pull request #1048 from gravitl/bugfix_v0.13.1_server_ipv6route
added static server routes
2022-04-28 10:19:00 -04:00
0xdcarns e1ab6b21fd added static server routes 2022-04-28 09:50:26 -04:00
0xdcarns 8a914d48e4 removed bad check for extra comma, added comment for relay handling of address6 later 2022-04-28 09:26:13 -04:00
0xdcarns 394c58319b test amend 2022-04-26 08:52:43 -04:00
afeiszli 894fd1f5bd making dual stack addressing work client side 2022-04-25 21:16:47 -04:00
afeiszli b03b4cfcff adding in ipv4 2022-04-25 20:50:09 -04:00
0xdcarns cee0ed1c39 reverted some old logic 2022-04-25 13:10:55 -04:00
0xdcarns 9d365c9c28 changes to allowedip parsing to handle ipv6 better 2022-04-25 13:10:55 -04:00
0xdcarns 7654556a3a bugfix tweaks 2022-04-25 13:10:55 -04:00
0xdcarns 6eab0498fc some changes around iptables 2022-04-25 13:10:55 -04:00
0xdcarns 5aae277551 added blank address check on peers 2022-04-25 13:10:55 -04:00
0xdcarns fed4650b3f start ipv6 from 1 2022-04-25 13:10:55 -04:00
0xdcarns 3298a074bb fixed issue around setting ipv6 or not unnecessarily 2022-04-25 13:10:55 -04:00
0xdcarns bcfc96ddd4 tidied go mod, fixed bug with last ipv6 addr 2022-04-25 13:10:55 -04:00
0xdcarns c39f2fed84 bugfix for reverse unique address 2022-04-25 13:10:55 -04:00
0xdcarns dc12b1e418 route changes + primary addr on node 2022-04-25 13:10:54 -04:00
0xdcarns 8e976d1f55 removed isdualstack references 2022-04-25 13:09:23 -04:00
0xdcarns ca1c75b620 set addresses appropriately based on if network is using ipv6/4 2022-04-25 13:08:45 -04:00
0xdcarns a78ebaaad1 added tests 2022-04-25 13:08:45 -04:00
0xdcarns 611a425852 added more uniform unique address checks 2022-04-25 13:08:45 -04:00
afeiszli 9a66674a5c minor logic revisions 2022-04-25 11:36:09 -04:00
afeiszli 91ca96534b adding comments, removing bad check 2022-04-25 11:36:09 -04:00
afeiszli 6a90cd803a publishing port changes 2022-04-25 11:36:08 -04:00
afeiszli ccc0ed851d adding local listen port 2022-04-25 11:34:32 -04:00
Matthew R. Kasun 747d6bc692 remove comms network leftovers
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-04-22 05:21:35 -04:00
Matthew R. Kasun 7152f6ccd4 remove references to grpc/comms net 2022-04-21 15:53:44 -04:00
Matthew R. Kasun 6aa1a68a6f register command - client 2022-04-13 15:25:35 -04:00
Matthew R. Kasun 935567761b mq direct to server public ip 2022-04-12 10:43:02 -04:00
0xdcarns 9b7631e6dc added ingress outbound to ext clients 2022-03-25 15:44:32 -04:00
dcarns 173916a4b3
Merge pull request #958 from gravitl/feature_v0.12.2_append_custom_dns
added custom dns entries to peer update
2022-03-23 20:34:26 -04:00
john s d1fb0b90af
netclient: math.Rand -> crypto.Rand (#956)
* netclient: math.Rand -> crypto.Rand

Signed-off-by: John Sahhar <john@gravitl.com>

* netclient: math.Rand -> crypto.Rand

* add tests

Signed-off-by: John Sahhar <john@gravitl.com>

* netclient: math.Rand -> crypto.Rand

* add test

Signed-off-by: John Sahhar <john@gravitl.com>
2022-03-23 12:06:26 -06:00
0xdcarns 5f1299042f added custom dns entries to peer update 2022-03-23 10:31:38 -04:00
0xdcarns 988c0d7629 fixed removing local servers on deletes 2022-03-22 14:29:20 -04:00
dcarns 9b2742a3c5
Merge pull request #925 from gravitl/refactor_v0.12.0_logging
replace ncutil.Log/PrintLog with logger.Log
2022-03-21 11:35:06 -04:00
Matthew R. Kasun 11b1098390 replace ncutil.Log/PrintLog with logger.Log 2022-03-21 11:27:25 -04:00
Matthew R. Kasun f615b685c7 server routes 2022-03-20 06:25:12 -04:00
0xdcarns 5ba79afeba added default acl value option for networks 2022-03-17 13:24:57 -04:00
0xdcarns ffbc0db33f send created network back in response to net create 2022-03-17 10:08:28 -04:00
John Sahhar c71c739ba2 logic/accesskeys: math.Rand -> crypto.Rand
This replaces the usage of the non-cryptographically
secure math.Rand with the system CSPRNG accessed via crypto.Rand.

Signed-off-by: John Sahhar <john@gravitl.com>
2022-03-16 22:19:22 -05:00
Matthew R Kasun 9e23e69141
Merge branch 'develop' into worklows 2022-03-15 09:10:10 -04:00
Matthew R. Kasun 628f1f1468 remove debug logs 2022-03-14 16:32:14 -04:00
Matthew R. Kasun 7d2aa4fc82 add network to peer 2022-03-14 15:56:01 -04:00
Matthew R. Kasun 0abba58bfb use string rather than []byte for dns 2022-03-14 14:59:41 -04:00
Matthew R. Kasun ead3570064 debugging log 2022-03-14 14:37:16 -04:00
Matthew R. Kasun fcbdca0263 change order of dns entry 2022-03-14 13:55:38 -04:00
Matthew R. Kasun 649bea1e40 fix typo
Signed-off-by: Matthew R. Kasun <mkasun@nusak.ca>
2022-03-14 13:42:42 -04:00
Matthew R. Kasun 1b8a3ed347 calc dns entries during peerupdate 2022-03-14 11:34:25 -04:00
0xdcarns 8ab7266c30 moved acl check 2022-03-11 15:19:06 -05:00
Alex Feiszli 52c7a5897a
Merge pull request #888 from gravitl/feature_v0.12.0_disabling_ext_clients
added ability to disable ext clients
2022-03-11 12:01:52 -05:00
0xdcarns 80b7862370 made server peer check more efficient 2022-03-11 11:48:08 -05:00
0xdcarns 8385d02987 edited where server sets peers to account for ACLs 2022-03-11 11:48:08 -05:00
0xdcarns 3e8a0554c2 changed dir name and added to gitignore, removed log 2022-03-11 11:48:08 -05:00
0xdcarns 53c662476b comment changes 2022-03-11 11:48:08 -05:00
0xdcarns 18cfdfd2ad added server update on ACL update 2022-03-11 11:48:08 -05:00
0xdcarns 1f6e347213 added acl logic to affect peers 2022-03-11 11:48:08 -05:00
0xdcarns 84a66af3ee log add 2022-03-11 11:48:08 -05:00
0xdcarns 7b5692b8b0 added basic api endpoints 2022-03-11 11:48:08 -05:00
0xdcarns 3d531cb830 added one more test 2022-03-11 11:48:08 -05:00
0xdcarns d3be82cf9d refactored node functions further 2022-03-11 11:48:08 -05:00
0xdcarns 765c264b56 began generalizing 2022-03-11 11:48:08 -05:00
0xdcarns c2514c06d4 refactored some logic to use typed functions 2022-03-11 11:48:08 -05:00
0xdcarns c1e3a79ba7 node ACL logic + tests implemented 2022-03-11 11:48:08 -05:00
0xdcarns 09c54b1c61 began ACL implementation 2022-03-11 11:48:08 -05:00
John Sahhar d322631ebb logic/extpeers: Set IPv6 in CreateExtClient
Signed-off-by: John Sahhar <john@gravitl.com>
2022-03-11 11:48:08 -05:00
0xdcarns 01484eec7b added ability to disable ext clients 2022-03-11 09:41:14 -05:00
0xdcarns 9f7afdcf37 made server peer check more efficient 2022-03-11 09:04:12 -05:00
0xdcarns 7eac05528a edited where server sets peers to account for ACLs 2022-03-11 08:59:53 -05:00
0xdcarns 112f03cf1f changed dir name and added to gitignore, removed log 2022-03-11 08:46:01 -05:00
0xdcarns c25ea9fe15 comment changes 2022-03-10 16:01:36 -05:00
0xdcarns 09551776fa added server update on ACL update 2022-03-10 14:55:40 -05:00
0xdcarns af8918e35f added acl logic to affect peers 2022-03-10 14:55:40 -05:00
0xdcarns 2e43facb8b log add 2022-03-10 14:55:40 -05:00
0xdcarns aefc8b090b added basic api endpoints 2022-03-10 14:55:40 -05:00
0xdcarns 9668a84cd0 added one more test 2022-03-10 14:55:40 -05:00
0xdcarns 68c7014802 refactored node functions further 2022-03-10 14:55:40 -05:00
0xdcarns 1d92e4cf5a began generalizing 2022-03-10 14:55:40 -05:00
0xdcarns da25da775c refactored some logic to use typed functions 2022-03-10 14:55:40 -05:00
0xdcarns a8043accc9 node ACL logic + tests implemented 2022-03-10 14:55:40 -05:00
0xdcarns 6061ccec76 began ACL implementation 2022-03-10 14:55:40 -05:00
John Sahhar be0055a630 logic/extpeers: Set IPv6 in CreateExtClient
Signed-off-by: John Sahhar <john@gravitl.com>
2022-03-08 16:12:17 -06:00
afeiszli 3bd4be258f fix gateway error 2022-03-07 14:48:56 -05:00
dcarns e1cb3531e1
Merge pull request #854 from gravitl/feature_0.12.0_host_dns
host dns
2022-03-07 08:58:19 -05:00
Schemen dbe5336a8e Add accept iptables rule for out interface 2022-03-03 11:58:17 +01:00
Matthew R. Kasun d596ec4753 hostctl for dns 2022-03-02 06:28:53 -05:00
afeiszli ccf1293736 fixed hub logic 2022-02-21 11:12:15 -05:00
afeiszli 11b3bc3c09 fixed hub logic 2022-02-21 11:11:46 -05:00
afeiszli 33df27a721 fixed hub logic 2022-02-21 11:08:45 -05:00
afeiszli f21dad5184 fixed hub logic 2022-02-21 09:45:42 -05:00
afeiszli f521e5380f hub and spoke logic 2022-02-21 08:27:31 -05:00
0xdcarns 0325795bf2 created comms filter 2022-02-18 19:47:20 -05:00
0xdcarns 6028e1b6de added comms checks 2022-02-18 19:37:12 -05:00
afeiszli c6a7238453 adding random comms network name logic 2022-02-18 15:18:50 -05:00
afeiszli 1c06cfc8f7 modified getpeers for hub network 2022-02-18 11:43:49 -05:00
afeiszli f55eeedbb9 settings for comms network 2022-02-18 11:11:21 -05:00
afeiszli be1763bb74 removing old node logic 2022-02-18 10:15:21 -05:00
afeiszli 8cd19c20c6 removed unnecessary variables from network, added IsHubAndSpoke 2022-02-18 09:49:58 -05:00
0xdcarns 25c4d8ff1e fixes 2022-02-17 10:33:48 -05:00
afeiszli c2d99269c5 add MTU to ifacedelta 2022-02-16 20:26:20 -05:00
Matthew R. Kasun 394271289a server node gets correct ip on update to network range 2022-02-16 13:27:13 -05:00
dcarns 5b6553153b
Merge pull request #780 from gravitl/v0.10.0
V0.10.0
2022-02-15 22:13:12 -05:00
0xdcarns 9bee126429 hotfix 2 2022-02-15 21:50:47 -05:00
Matthew R. Kasun e8a897f342 checkin logic updated 2022-02-15 15:40:38 -05:00
dcarns 8b184fd18f
Merge pull request #769 from gravitl/feature_v0.10.1_token_length
Feature v0.10.1 token length
2022-02-15 13:20:59 -05:00
Matthew R. Kasun 7e9f65ad1b remove corednsAddrr from token 2022-02-15 11:25:50 -05:00
0xdcarns 5c35ca433e edited run updates 2022-02-15 10:12:39 -05:00
0xdcarns 469618aa72 removed default master key and added warning log if not set 2022-02-15 10:12:37 -05:00
0xdcarns e9f848c62a fix comment 2022-02-15 09:54:36 -05:00
0xdcarns 789cb27d48 added jwt fix 2022-02-15 09:51:21 -05:00
Matthew R. Kasun 5e3654faa9 remove commented out code 2022-02-15 08:10:51 -05:00
Matthew R. Kasun 950ce4b4da removed APIConnString from accessToken 2022-02-15 07:13:02 -05:00
Matthew R. Kasun f3c5800912 removed unnecessary data elements 2022-02-14 17:57:28 -05:00
0xdcarns f47a6af400 edited run updates 2022-02-14 11:01:33 -05:00
0xdcarns 51fa553df3 removed default master key and added warning log if not set 2022-02-14 09:58:50 -05:00
Matthew R. Kasun fd6c4742de get address range from network 2022-02-09 15:21:51 -05:00
Matthew R. Kasun e39138c184 removed hard coded netmask 2022-02-09 14:41:13 -05:00
0xdcarns 758c1cf097 changed initial name of server 2022-02-08 22:16:57 -05:00
0xdcarns 456272d549 fixed issue with delete 2022-02-08 11:01:44 -05:00
afeiszli ea7cb6f39e fixing logging, disable non-linux relays, reset dns on error 2022-02-07 14:04:07 -05:00
afeiszli 96535554f5 fixing mac stuff and dns testing 2022-02-07 11:38:47 -05:00
afeiszli f6b1711439 ext client logic for peer updates 2022-02-06 13:06:07 -05:00
afeiszli 62d0a6a83a adding comments 2022-02-06 11:43:07 -05:00
afeiszli 7c56420b9f backup logic for relay failing, dont allow server to be relayed 2022-02-06 11:36:38 -05:00
afeiszli bea7467210 fixing tests 2022-02-05 15:50:29 -05:00
afeiszli dd79186a81 changing validation 2022-02-05 15:50:29 -05:00
afeiszli 7bf864a387 fixing dns and various logs 2022-02-05 15:50:29 -05:00
0xdcarns 1a7a8beabc added server pulls upon server initialize if networks present 2022-02-05 13:12:07 -05:00
afeiszli 2cbf08ad1e adding logic for key checks, OS on server 2022-02-04 14:19:26 -05:00
afeiszli 83c4f99192 set relayed nodes UDP to off and update them 2022-02-04 11:54:50 -05:00
afeiszli a693217feb switch for udp hole punch 2022-02-03 09:51:37 -05:00
afeiszli 239b9d36fc change queue identifier from server.ID to Network.NetID 2022-02-03 09:51:37 -05:00
0xdcarns f7258bf98f refactored some client leave & cache and server join logic 2022-02-03 09:51:37 -05:00
afeiszli 7c4e8b2b4a removing peer cache 2022-02-01 23:30:10 -05:00
afeiszli f6c68bd209 removing UUID gen from client side 2022-02-01 22:01:30 -05:00
afeiszli c8154ffa5d remove GetNodeByIDOrMacAddress 2022-02-01 21:50:11 -05:00
afeiszli d2467e13f3 allow adding address 2022-02-01 15:27:00 -05:00
afeiszli c210a223ea set networkservers on network create 2022-02-01 10:08:44 -05:00
afeiszli 1e5a0e9d04 fix server self updates 2022-01-31 23:18:58 -05:00
afeiszli 86ba127b3b change order of operations 2022-01-31 20:38:16 -05:00
afeiszli e778136a19 change order of operations 2022-01-31 20:36:09 -05:00
afeiszli 770b4e5892 change order of operations 2022-01-31 20:33:15 -05:00
afeiszli 467ebfd7d7 server address enhancements 2022-01-31 20:29:00 -05:00
afeiszli c6252764e8 fix peer sync 2022-01-31 17:13:19 -05:00
0xdcarns 4823566125 debug again 2022-01-31 11:20:59 -05:00
0xdcarns 36b319c772 debug 2022-01-31 11:20:11 -05:00
0xdcarns 2a4a30f937 added debug stuff 2022-01-31 11:20:11 -05:00
0xdcarns 4740551473 iface delta 2022-01-31 11:19:19 -05:00
afeiszli 3e130fe9f8 cleaning server side peer logic 2022-01-31 11:18:38 -05:00
0xdcarns ae4b1bee57 edited peer update 2022-01-31 11:18:38 -05:00
Matthew R Kasun c421c1410b save servAddr to database on join 2022-01-30 13:37:10 -05:00
Matthew R Kasun 7ac0bfd13a Merge remote-tracking branch 'origin/develop' into feature_v0.10.0_serverPings 2022-01-30 09:18:24 -05:00
Matthew R Kasun 20569ee8ec Merge remote-tracking branch 'origin/develop' into feature_v0.10.0_serverPings 2022-01-30 05:55:52 -05:00
0xdcarns ad79f2ea1f addresses review comments 2022-01-29 18:18:46 -05:00