Skip to content

Commit

Permalink
update git readme with details how to use and use default if no devic…
Browse files Browse the repository at this point in the history
…e set
  • Loading branch information
Grotax committed Jul 2, 2024
1 parent c6dab3f commit 567bb6f
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 34 deletions.
37 changes: 25 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,40 @@ To create a new fastd secret, execute the following, this will ask you for a pas
```
ansible-vault create --vault-id fastd_key@prompt host_vars/$gatewayname.yml
```
Enter

The config has the following options.

| option | comment |
|:-------------|:-----------------------------------------------------------------------------|
| fastd_secret | fastd secret key |
| wg_device | Optional but you can put the name here that was generated by mullvad |
| wg_pk | Wireguard private key provided by mullvad |
| wg_address | ipV4 and ipV6 address provided by mullvad |
| wg_country | Country supported by mullvad |
| wg_city | A City that mullvad has in your selected country |
| ffshmon_mail | The email that should be used to send alerts if the wireguard tunnel is down |
| ffshmon_pw | The password for the email |

For available country and city check here: https://mullvad.net/de/servers

Example config:

```
fastd_secret: $yourkey
# If you want to use a wireguard exit
wireguard_interface: |-
[Interface]
...
wireguard_peer: |
[Peer]
...
fastd_secret: 1234df132fssd...
wg_device: Mellow Pony
wg_pk: aDfkfdsgnn1232345...
wg_address: 1.2.3.4/32,fxx...../128
wg_country: Netherlands
wg_city: Amsterdam
ffshmon_mail: [email protected]
# Check KeePass
ffshmon_pw: ...
ffshmon_pw: secretpassword
```
save and close the editor, done you added your secret :)

You can change the content any time by
```
ansible-vault edit --vault-id fastd_key@prompt host_vars/$gatewayname.yml
```

## Usage

Run playbook on all gateways listed in `hosts`:
Expand Down
42 changes: 21 additions & 21 deletions host_vars/brunsbach.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
$ANSIBLE_VAULT;1.2;AES256;fastd_key
65653062623064393064333132323261313530356332386237366166383061303363366435316364
3566623563303663393963653931616438633036663433630a636565313731376532346636323237
66323735343865396463656431333762663235626366376662383066663866306331663730663438
6534303263366461390a626166303339303966353436653961393164646562366661633964376661
61323137656164353532633063383761383064343839323931643736353637623733613661623038
65636265366466326436353930353962343431353566623136373330353865323532353937316164
34333231383034303135663134306564323139323864306263366135656539376366616433316633
33623237313662613236343564336436376530663031343534663633383764396334626562653431
64623964356265366637316333336330363037343664643365646635333665333939306265376334
32396138353434306539386634356261613433663338616330313062373735613763616231363339
30383238306437393461623761323436316238616565303561633434353534376264656161393630
63373162336333343131303131636563306131613739386239353339623734336538356337623330
34393236663030376532386132633938373435636265373764613931303235646237633234323034
32613266363733313264386632366462323334636265353632616430616132616133393135333336
38633364343934346361363038393065613730663661393464306434643730633030336633353630
30646366326364333366323564653935346333353235646637663635356635323964316134666463
39343637666466343661373238613764613263633562613337643735376131376566306666656235
37333932306161636439623236376666346465343063643838363637616162393235656538316566
39623530653865326337633662373639666635373936656561353135363838323336623938633966
36373235613136656162323963656238303737363463653863313933623133393861346638396139
31353330356334383932353239363231303236303164666635626336316337353066
32353932343362303661303631326539333861353564373065393430353036366630316237383862
3634376239393138336135343961376430393730346465320a333233306639303662633439353264
64316563373134666433633763643239373863346635663063343336643166373865376363393931
3862663630333634650a646534363031326261376561633266616434376334386563623961653666
34343565353630613834393566373835343331616331643437336363306138303437343731373332
37373262333030346436663030643132336265303864653464376266636465386131356239356466
33373766663836333938393938323132613230316338643962643137396665356565393761653831
66623263646263316261663638383837663835666163666434373436353038343064313964613437
64396639626162313465303361373938333762316232343065376562316238363765333466393033
65393531663963643338666133653438393737653632646434356138653565313165623335396530
30653931653965373334663431363435306164616162616333376634356633393365346137396432
62646337343365366562663433356536303335333832623565386235326532393261663136653163
33306632643232643732353533623438323539363361626138313337623833616164343638356265
62306636646234613362396236643039336331353533626565313535326635646330343838393862
39383065373134386164363035363538303935653062653334323037636133666564636534366565
66363436646636613038356437393063323865303064663033346431633031633331366333363537
35316533376332376262636466386165343230373365343731393463356162626163333864323439
61666566653739306563623364646337363530396439393061396239303366666330616130336364
38616232353630376431643665326630333433383832316230306264353162653932663035343439
63353664393235373662346562303461303963393537393439663132623338653838316639343635
61633433623237636463373137343265646130653964613139373466393633306666
2 changes: 1 addition & 1 deletion roles/wireguardexit/tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
version: main

- name: Run inital config generation
ansible.builtin.command: python3 /opt/wg-conf-gen/wg-conf-gen.py --pk {{ wg_pk }} --address {{ wg_address }} --country {{ wg_country }} --city {{ wg_city }} --device "{{ wg_device }}"
ansible.builtin.command: python3 /opt/wg-conf-gen/wg-conf-gen.py --pk {{ wg_pk }} --address {{ wg_address }} --country {{ wg_country }} --city {{ wg_city }} --device "{{ wg_device| default('Unkown') }}"

- name: Re-start and enable wireguard service
ansible.builtin.systemd:
Expand Down

0 comments on commit 567bb6f

Please sign in to comment.