Compare commits

...

7 Commits

Author SHA1 Message Date
Leon Vita 7116a375a9 add new client 2023-04-10 04:47:31 +01:00
Leon Vita 6404e1008d add new client 2023-04-08 23:19:34 +01:00
Leon Vita 150f0a6938 add new client 2023-04-06 01:57:08 +01:00
Leon Vita 7609decee2 add new client 2023-03-29 00:46:00 +01:00
Leon Vita 1b9b755595 add new client 2023-03-24 02:37:17 +00:00
Leon Vita c08850f4b2 add new client 2023-02-25 13:18:34 +00:00
Leon Vita 749317fa04 fix =/n in database keys 2022-12-31 15:02:40 +00:00
12 changed files with 67 additions and 12 deletions

BIN
.DS_Store vendored

Binary file not shown.

2
IPS
View File

@ -4,7 +4,7 @@ ips=(
#server_ips:
"10.10.11.1/24" "10.10.100.1/24" "10.10.11.2/24"
#Client_ips:
"10.10.11.103/24" "10.10.11.63/24" "10.10.11.12/24" "10.10.11.6/24" "10.10.11.91/24" "10.10.11.30/24" "10.10.11.90/24" "10.10.11.4/24" "10.10.11.3/24" "10.10.11.61/24" "10.10.11.51/24" "10.10.11.60/24" "10.10.11.50/24"
"10.10.11.33/24" "10.10.11.31/24" "10.10.11.66/24" "10.10.11.25/24" "10.10.11.55/24" "10.10.11.21/24" "10.10.11.103/24" "10.10.11.63/24" "10.10.11.12/24" "10.10.11.6/24" "10.10.11.91/24" "10.10.11.30/24" "10.10.11.90/24" "10.10.11.4/24" "10.10.11.3/24" "10.10.11.61/24" "10.10.11.51/24" "10.10.11.60/24" "10.10.11.50/24"

Binary file not shown.

View File

@ -0,0 +1,8 @@
[Interface]
Address = 10.10.11.21/24
PrivateKey = CMCC4YZA1mgKrqmXWOj2J5Cjkri9mDcUlCHsKx+k1nc=
[Peer]
PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=
Endpoint = 45.158.40.162:18900
AllowedIPs= 10.10.11.0/24
PersistentKeepalive = 25

View File

@ -0,0 +1,8 @@
[Interface]
Address = 10.10.11.31/24
PrivateKey = kNEj7LgdsZE6sCoTaz5/Vt3qWmCOuRjVBMoBWAHg718=
[Peer]
PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=
Endpoint = 45.158.40.162:18900
AllowedIPs= 10.10.11.0/24
PersistentKeepalive = 25

8
config_file/demo.conf Normal file
View File

@ -0,0 +1,8 @@
[Interface]
Address = 10.10.11.55/24
PrivateKey = CDc+SEBDwVh4wLUNCkxjxhHN7QYknyXGbVngr6Vs1lA=
[Peer]
PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=
Endpoint = 45.158.40.162:18900
AllowedIPs= 10.10.11.0/24
PersistentKeepalive = 25

View File

@ -1,9 +1,9 @@
[Interface]
Address = 10.10.11.30/24
PrivateKey = cPw3FniYHoDv9MbB6DWxr0sc61bVTIJon6ytJ1AB1lI=
DNS = 10.10.11.1,8.8.8.8
[Peer]
PublicKey = w3qegSSuqFTFrGk4XJaWBSwGDOiqbnnAIR9MzwjYVA8=
PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=
Endpoint = 45.158.40.162:18900
AllowedIPs= 10.10.11.0/24
PersistentKeepalive = 25

View File

@ -0,0 +1,8 @@
[Interface]
Address = 10.10.11.25/24
PrivateKey = 2L3Kojc23Al32K7nVaOOpZ+hIw3E+UhLScTpiaTRR04=
[Peer]
PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=
Endpoint = 45.158.40.162:18900
AllowedIPs= 10.10.11.0/24
PersistentKeepalive = 25

9
config_file/malak.conf Normal file
View File

@ -0,0 +1,9 @@
[Interface]
Address = 10.10.11.33/24
PrivateKey = uFgN3C3h9us4ZDPjASveA+CEf9CQJREljh0iMm2kwm0=
DNS = 8.8.8.8
[Peer]
PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=
Endpoint = 45.158.40.162:18900
AllowedIPs= 10.10.11.0/24
PersistentKeepalive = 25

8
config_file/zeo_vm.conf Normal file
View File

@ -0,0 +1,8 @@
[Interface]
Address = 10.10.11.66/24
PrivateKey = AJ84Vyijo+sxlb9aEYd3dESuCaR17bO/G62mt/51UlI=
[Peer]
PublicKey = iEVq4lvvKFfqjcoYYyNkA0MS8rcSGaDfPwQGN3C7+D0=
Endpoint = 45.158.40.162:18900
AllowedIPs= 10.10.11.0/24
PersistentKeepalive = 25

18
data.py
View File

@ -3,7 +3,7 @@ import subprocess
from datetime import datetime
#initialize database
create = sqlite3.connect("db")
create = sqlite3.connect("database.db")
connect = create.cursor()
#Create TABLE only IF NOT Exist
@ -30,7 +30,6 @@ def user_input():
#read keys file
with open("publickey.txt","r") as pk:
public = pk.read()
print(type(public))
with open("privatekey.txt","r") as prk:
private = prk.read()
# user input
@ -61,23 +60,24 @@ def add_ips(
#insert values to VPN TABLE
connect.execute("INSERT INTO VPN VALUES (?,?,?,?,?,?)",
(
('User = ' + user_name),
(user_name),
(user_ips + "/24"),
(user_public_key),
(user_private_key),
('Public_key= ' + user_public_key.replace('\n', '')), #replace char \n to normal key
('Private_key' + user_private_key.replace('\n', '')), #replace char \n to normal key
('Date: ' + date),
('Time: ' + time)
))
#Commit into db
create.commit()
#delete the keys
subprocess.run("rm privatekey.txt publickey.txt",shell=True)
#should deltet after finish
# connect.execute("SELECT rowid, * FROM VPN") #to check with rowid use WHERE rowid = 1
# items = connect.fetchall()
# for item in items:
# print(item)
connect.execute("SELECT rowid, * FROM VPN") #search
items = connect.fetchall()
for item in items:
print(item)
#-----------------------------------------------------

View File

@ -12,3 +12,9 @@
10.10.11.12/24 = privatekey= KDWbHoNkMi0WFL6DJFbvuDrWrVC7Buc/RfGL5urx9HM= publickey= djNLXtdgDAD2P/14EHXG8bjcHkKvPflNZhEHq5AEcgU=
10.10.11.63/24 = privatekey= QH9HjF2OJfebhPPvsHGZ8myvoxlYm5RoH/mmrYDgTV8= publickey= +/neUKXEHkLv+zYGw37+ckwoT3kHQIHyHRTbCtjUUA4=
10.10.11.103/24 = privatekey= qAGUiA1gIa7uvxIUMol0DPYoxp5udMn920qkIT8R0U8= publickey= VQZvMk2aLc36Llty5yIvBWQkyCwM8dwrqLM6WTOPpzU=
10.10.11.21/24 = privatekey= CMCC4YZA1mgKrqmXWOj2J5Cjkri9mDcUlCHsKx+k1nc= publickey= l63JSZVnqWgFvKol+MlXWPnPjwq3b0L8gVkOzQz/F3k=
10.10.11.55/24 = privatekey= CDc+SEBDwVh4wLUNCkxjxhHN7QYknyXGbVngr6Vs1lA= publickey= ukCfHVOPY5Owag1twXYcC7EQTak1JxozssbAtS9+vjM=
10.10.11.25/24 = privatekey= 2L3Kojc23Al32K7nVaOOpZ+hIw3E+UhLScTpiaTRR04= publickey= tJQovqjH5cmV9GIxweVl8pP19RjZq2wfYKELwS2WDnY=
10.10.11.66/24 = privatekey= AJ84Vyijo+sxlb9aEYd3dESuCaR17bO/G62mt/51UlI= publickey= aUoH+Ukmsrk4zsQj5LX/VeuXMjgTTHZ98voy6zvNf14=
10.10.11.31/24 = privatekey= kNEj7LgdsZE6sCoTaz5/Vt3qWmCOuRjVBMoBWAHg718= publickey= uJYIR+BFdOauVY/wrohpufOl9ZxmQ1CbDNUVHnz0+Uc=
10.10.11.33/24 = privatekey= uFgN3C3h9us4ZDPjASveA+CEf9CQJREljh0iMm2kwm0= publickey= H5mMm7EblaSjEKLkKEn8575XeKWFgs/7LjEIpBwJ0HU=