-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fixes to the routing, dynamic interface name, fixed disappearing…
… public key
- Loading branch information
1 parent
07fd1a8
commit 31edb06
Showing
9 changed files
with
55 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# VPN address | ||
# VPN address. Must be on both sides, without this line the nodes wont be able to ping each other | ||
Subnet = {{ client.ip }}/32 | ||
|
||
# My public key, should be propagated to other VPN peers, including gateway | ||
{{ client_key }} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
{% for subnet in subnets_to_expose %} | ||
ip -4 route del {{ subnet }} dev {{ dev_interface | default("tun0") }} || true | ||
ip -4 route del {{ subnet }} dev $INTERFACE || true | ||
{% endfor %} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/bin/sh | ||
ifconfig $INTERFACE hw ether {{ client.hw_ether }} | ||
ifconfig $INTERFACE hw ether {{ client.hw_ether }} || true | ||
ifconfig $INTERFACE {{ client.ip }} netmask {{ netmask | default("255.255.255.0") }} -arp | ||
|
||
{% for subnet in subnets_to_expose %} | ||
ip -4 route add {{ subnet }} dev {{ dev_interface | default("tun0") }} | ||
ip -4 route add {{ subnet }} dev $INTERFACE | ||
{% endfor %} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
ifconfig $INTERFACE hw ether {{ gateway_hw_ether }} | ||
ifconfig $INTERFACE hw ether {{ gateway_hw_ether }} || true | ||
ifconfig $INTERFACE {{ gateway_ip }} netmask {{ gateway_mask }} -arp |