Created
May 16, 2016 10:18
-
-
Save pandada8/9ab2c0e5c1fcee36af84f9386ec5ecf5 to your computer and use it in GitHub Desktop.
setup zerotier
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
requests.post("http://127.0.0.1:9993/controller/network/##########000001", json={ | |
"name": "test", | |
"private": True, | |
"enableBroadcast": False, | |
"allowPassiveBridging": False, | |
"v4AssignMode": "zt", | |
"v6AssignMode": "none", | |
"multicastLimit": 24, | |
"ipLocalRoutes": ["192.168.233.0/16"], | |
"ipAssignmentPools": [{"ipRangeStart": "192.168.233.1", "ipRangeEnd": "192.168.233.254"}], | |
"relays": [{"address": "##########", "phyAddress": "<ip>/<port>"}], | |
"rules": [{"ruleNo": 999, "action": "accept"}] # allow all traffic | |
}, headers={"X-ZT1-Auth": "<ignored>"}) | |
requests.post("http://127.0.0.1:9993/controller/network/##########000001/member/##########", headers={"X-ZT1-Auth": "<ignored>"}, json={ | |
"authorized": True, | |
"activeBridge": False, | |
"ipAssignments": ["192.168.233.3/24"]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment