Compare commits

...

7 commits

Author SHA1 Message Date
mzs114 ce5f3c4e8a
Merge fa5b28e2ee into 891990b2f1 2024-09-14 15:44:53 +08:00
Donald Zou 891990b2f1
Merge pull request #387 from donaldzou/v4.0.3-fix
Ready for v4.0.3
2024-09-14 15:44:26 +08:00
Donald Zou e9ab7029c9 Ready for v4.0.3 2024-09-14 15:21:10 +08:00
Donald Zou 6f681dba09
Merge pull request #386 from donaldzou/v4.0.3-fix
Update privatePublicKeyInput.vue
2024-09-14 15:14:50 +08:00
Donald Zou b3edff947d Update privatePublicKeyInput.vue
Fixed issue mentioned in #375
2024-09-14 15:13:47 +08:00
mzs114 fa5b28e2ee
Update postdown.sh
Added a corresponding rule to clean up the peer drop traffic rule in the postdown script.
2024-09-04 17:20:28 +05:30
mzs114 32a6678378
Update postup.sh
Added drop rules to drop the traffic between the peers, this is required for enhanced security.
2024-09-04 17:19:05 +05:30
8 changed files with 48 additions and 30 deletions

View file

@ -33,7 +33,7 @@ import threading
from flask.json.provider import DefaultJSONProvider
DASHBOARD_VERSION = 'v4.0.2'
DASHBOARD_VERSION = 'v4.0.3'
CONFIGURATION_PATH = os.getenv('CONFIGURATION_PATH', '.')
DB_PATH = os.path.join(CONFIGURATION_PATH, 'db')
if not os.path.isdir(DB_PATH):

View file

@ -7,6 +7,9 @@ CHAIN_NAME="WIREGUARD_$WIREGUARD_INTERFACE"
iptables -t nat -D POSTROUTING -o $MASQUERADE_INTERFACE -j MASQUERADE -s $WIREGUARD_LAN
# Remove the drop rules between the peers
iptables -D FORWARD -i $WIREGUARD_INTERFACE -o $WIREGUARD_INTERFACE -j DROP
# Remove and delete the WIREGUARD_wg0 chain
iptables -D FORWARD -j $CHAIN_NAME
iptables -F $CHAIN_NAME

View file

@ -22,5 +22,8 @@ iptables -A $CHAIN_NAME -o lo -j ACCEPT
# Drop everything else coming through the Wireguard interface
iptables -A $CHAIN_NAME -i $WIREGUARD_INTERFACE -j DROP
# Drop traffic between the peers
iptables -I FORWARD -i $WIREGUARD_INTERFACE -o $WIREGUARD_INTERFACE -j DROP
# Return to FORWARD chain
iptables -A $CHAIN_NAME -j RETURN

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -30,12 +30,24 @@ export default {
this.data.private_key = this.keypair.privateKey;
this.data.public_key = this.keypair.publicKey;
},
testKey(key){
const reg = /^[A-Za-z0-9+/]{43}=?=?$/;
return reg.test(key)
},
checkMatching(){
try{
if (window.wireguard.generatePublicKey(this.keypair.privateKey)
!== this.keypair.publicKey){
this.error = true;
this.dashboardStore.newMessage("WGDashboard", "Private Key and Public Key does not match.", "danger");
if(this.keypair.privateKey){
if(this.testKey(this.keypair.privateKey)){
this.keypair.publicKey = window.wireguard.generatePublicKey(this.keypair.privateKey)
if (window.wireguard.generatePublicKey(this.keypair.privateKey)
!== this.keypair.publicKey){
this.error = true;
this.dashboardStore.newMessage("WGDashboard", "Private Key and Public Key does not match.", "danger");
}else{
this.data.private_key = this.keypair.privateKey
this.data.public_key = this.keypair.publicKey
}
}
}
}catch (e){
this.error = true;