Compare commits
27 commits
master
...
wireguard-
Author | SHA1 | Date | |
---|---|---|---|
bba0cb7a4d | |||
6dabcb0966 | |||
f24a3e1d29 | |||
93c229203a | |||
8e7701423d | |||
2a57b43184 | |||
94c49143ac | |||
1d4e03d521 | |||
bdcd5095ed | |||
fed9c9f6cc | |||
a9a734f51d | |||
ba171135b1 | |||
592d3a630a | |||
22c970d9b4 | |||
9954c9e7d5 | |||
259c2afeab | |||
85c1d905e7 | |||
227c585b88 | |||
63a26b74d0 | |||
f1605415fe | |||
d1822b3b21 | |||
5c7360aded | |||
0fbcd687d3 | |||
7d7444183f | |||
40527da466 | |||
|
8399078c2f | ||
ea87aa7ec1 |
25 changed files with 984 additions and 173 deletions
|
@ -89,3 +89,86 @@ apartment_block_dhcp: "{{ apartment_block }}"
|
||||||
ipv6_base_prefix: "2a09:6840"
|
ipv6_base_prefix: "2a09:6840"
|
||||||
|
|
||||||
is_aurore_host: "{{ 'aurore_vm' in group_names }}"
|
is_aurore_host: "{{ 'aurore_vm' in group_names }}"
|
||||||
|
|
||||||
|
nftables_interco_v4:
|
||||||
|
- 10.129.0.0/16
|
||||||
|
- 192.168.0.0/31
|
||||||
|
- 192.168.0.2/31
|
||||||
|
|
||||||
|
nftables_interco_v6:
|
||||||
|
- 2a09:6840:129::0/48
|
||||||
|
|
||||||
|
nftables_adm_v4:
|
||||||
|
- 10.133.0.0/16
|
||||||
|
|
||||||
|
nftables_adm_v6:
|
||||||
|
- 2a09:6840:133::0/48
|
||||||
|
|
||||||
|
nftables_bastions_v4:
|
||||||
|
- 10.133.0.250
|
||||||
|
|
||||||
|
nftables_bastions_v6:
|
||||||
|
- 2a09:6840:133::250
|
||||||
|
|
||||||
|
nftables_svc_v4:
|
||||||
|
- 10.128.0.0/16
|
||||||
|
- 10.132.0.0/16
|
||||||
|
|
||||||
|
nftables_svc_v6:
|
||||||
|
- 2a09:6840:128::0/48
|
||||||
|
- 2a09:6840:132::0/48
|
||||||
|
|
||||||
|
nftables_members_v4:
|
||||||
|
- 10.10.0.0/16
|
||||||
|
- 10.11.0.0/16
|
||||||
|
- 10.20.0.0/16
|
||||||
|
- 10.21.0.0/16
|
||||||
|
- 10.30.0.0/16
|
||||||
|
- 10.31.0.0/16
|
||||||
|
- 10.40.0.0/16
|
||||||
|
- 10.41.0.0/16
|
||||||
|
- 10.50.0.0/16
|
||||||
|
- 10.51.0.0/16
|
||||||
|
|
||||||
|
nftables_members_v6:
|
||||||
|
- 2a09:6840:10::0/48
|
||||||
|
- 2a09:6840:11::0/48
|
||||||
|
- 2a09:6840:12::0/48
|
||||||
|
- 2a09:6840:20::0/48
|
||||||
|
- 2a09:6840:21::0/48
|
||||||
|
- 2a09:6840:22::0/48
|
||||||
|
- 2a09:6840:30::0/48
|
||||||
|
- 2a09:6840:31::0/48
|
||||||
|
- 2a09:6840:32::0/48
|
||||||
|
- 2a09:6840:40::0/48
|
||||||
|
- 2a09:6840:41::0/48
|
||||||
|
- 2a09:6840:42::0/48
|
||||||
|
- 2a09:6840:50::0/48
|
||||||
|
- 2a09:6840:51::0/48
|
||||||
|
- 2a09:6840:52::0/48
|
||||||
|
|
||||||
|
nftables_signup_v4:
|
||||||
|
- 10.13.0.0/16
|
||||||
|
- 10.23.0.0/16
|
||||||
|
- 10.33.0.0/16
|
||||||
|
- 10.43.0.0/16
|
||||||
|
- 10.53.0.0/16
|
||||||
|
|
||||||
|
nftables_signup_v6:
|
||||||
|
- 2a09:6840:13::0/48
|
||||||
|
- 2a09:6840:23::0/48
|
||||||
|
- 2a09:6840:33::0/48
|
||||||
|
- 2a09:6840:43::0/48
|
||||||
|
- 2a09:6840:53::0/48
|
||||||
|
|
||||||
|
# Afone network
|
||||||
|
nftables_signup_triggers_v4:
|
||||||
|
- 217.112.64.0/20
|
||||||
|
- 46.255.48.0/21
|
||||||
|
- 77.74.240.0/21
|
||||||
|
- 93.191.184.0/21
|
||||||
|
|
||||||
|
# Afone network
|
||||||
|
nftables_signup_triggers_v6:
|
||||||
|
- 2a02:20f8::/32
|
||||||
|
...
|
||||||
|
|
|
@ -1,174 +1,199 @@
|
||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
34336231623938346631313932323131336439623837626366646338396137633436646365386639
|
61303436333132666364303233623130666161303631316436336533656130366363356436626331
|
||||||
6332383765386235396331373836366230663563376665380a616436373136633933376435653230
|
6362656232663832643837303964636330393239386531650a383635343032633566393536653439
|
||||||
64333963663436393265666434653164643164616134353665306462326666623530383838343135
|
66326133633561323362643730356461366633306363333265663964393962646534656463333865
|
||||||
3531343533656332350a343432336636316131386132306238653736633966363235623833343638
|
3962653036363361390a303538383036383733643231363936653161306635396365323339643261
|
||||||
38643061383963396466346536343061653034333037393664356661376565643765306462626231
|
30373263656337613535643137616634633737363264396230336631643366643130623835383233
|
||||||
39326233363962373839303464333833306532343834306232653731326135653934643836323639
|
65616632666135636261303665323537626230656537326538363332653565353031643739366237
|
||||||
36343937626536346331613263663865346634666534646266623061303639626636393230616261
|
37336666376133383136353062666435373738353333386130633265333333663463396236393565
|
||||||
32336366356439353738633234326138656464656630303362623664616634306230623538373965
|
62366332323939353335613535306235316530316339643537363538633432373532323833373162
|
||||||
32346439306337623737616666353830626630373562366436653131393532313035303836326430
|
35666261363862623433636266303236663439303737313136343632623661623837616136643438
|
||||||
64613235646366616533313065396663366434363832333535336631323366336437396664303834
|
33336237306136376165653236303261643563393134313636376237313436373830366531643261
|
||||||
30336466313064636565326564356435306136396363373464326534303366323262303732626661
|
39633364333633343835333763663230373862326431383130353237353662346362343330383264
|
||||||
38326663313332633530353739346538343434316133343066313530366637376135323564306537
|
63333137626464363638643762383162616437373366316565313131636635636665653937636565
|
||||||
65626261303231656432333364333965663065346436626631666466643934623064333163626339
|
36356236643364616262343837393631646363373432626534633064393930316330653930656465
|
||||||
32633565303734303862326365336339346133393431636266303530626564326361653230626536
|
66306335313164306134636664623331393766373337373438306130363137666366383737643634
|
||||||
32313231373037633134623761663832393666353732613965613436323939343233613433343538
|
65336130616431626331393330313263366132663766663662376461313431373838303562656361
|
||||||
37326438383130303861316663396333376662386337353964633930353536653437653061356635
|
65626161653164663730353562383833313334343761313533636437373061376634303662646633
|
||||||
35646232343535313130646237643835376162623639333961323964353830653366626438346237
|
34666666333461353437353564633939393731336664393238376566306234653834323431663666
|
||||||
36343663346332656537363434396633336161373730663364306239306432343930643230656465
|
62386665306437643735326133366131366132613438366662383530666632353964636634363236
|
||||||
37633537616232656661313764626232303535383563353861396431643735326162383866626231
|
61333261323731633236353161616130653566333432313631633766343937653532616165626133
|
||||||
61383165613332666537656137636430323332326335323763303537386662646263353539613964
|
65376635336434336263333362383864313831616362373535306265303330336436363865343234
|
||||||
37323966306364306436653033393931663239383435613836356164633135306233356364313036
|
63393461303739316536353466666665316135373333336363333661353761376363313963613165
|
||||||
39356661613434633930633066646437636535313565356366303732613731333062643231313035
|
63666137376333643165346134613164373065646334306537663765346538343439663337373938
|
||||||
65333461396131663764626665393562623030343561313136363964393664376136303839333664
|
31313334333561626631613332353234303139363033663362616236386536326466303662643861
|
||||||
65313465623331333538393734373264313562643232666130303930333662616465656432363039
|
36376261636332323264336136633634663330353562373731626133646163323965373161306631
|
||||||
66616530336666343861336434633063343561323931323931346132376263376565313366306639
|
35653136323133323733656439643732366564633437346334613337356461393563343063626337
|
||||||
64646465303432333136353661323936633965666364356633653861363139616562653834313861
|
30633030653133616239616332356661373265616139383234613933653462626563623166656632
|
||||||
63306133613066373462383236613939316130623937643939323134343936356638376335323836
|
62643739313436343162656339656231363534646363646437613839383935336436306230613534
|
||||||
39383334656236633037633230313138326238303863623231353465346661663162623138353461
|
64353436373134336435643062306163636231636466386662616138376535633536323766333566
|
||||||
33343738613137366364633730346261366564646161373837613865393233663431636361663962
|
39343135643263356439663030643364613264363766643663353131343538343361383166353232
|
||||||
38313230363737306265636435353533666262333666383639343364633464396566333433333538
|
61343261613234326565323334626266373362656335323638613661363236386463353232646563
|
||||||
39643934646537653234336361613664333434623739353831316531313666396638333136343638
|
37383339333338653165663665366165366436386439313032643864333863646634323439613861
|
||||||
33653034366362363562633462303165626333306664326366353334363964663936616430643662
|
33353032663466623962313033393139336562666331656162313938643439643762626666653662
|
||||||
30616334326638323133366632663237356238353934323361376237613632396134663536336364
|
35313436646231313131623631326438343166376339656431356235613436316130626631323130
|
||||||
39363439326335363437373939353564646663616464663763353931323233316135656634343137
|
31336131396237623339663866646531663737366532396138343261653564376562383664343636
|
||||||
34396130386134386331643534353461663963323435656337653032376565313635623231343135
|
34656236646665346663366231643831346237646338343063376266336363366462333932373162
|
||||||
34303130316239303065386134663332393938636332363665643832326439653733633231346537
|
37333665326438663539623233356565636133656566323761386139313032386330366166623235
|
||||||
63383634333034323434376237663932613638363835393837613632663265616363303233653539
|
65653964616262666233396338633233333037356562623236636233313666343266353162366136
|
||||||
61333765313463616665613136303533343230303735626437343635303934613365326166333966
|
64656330306263636362646163366165333937366230646132636431343034343430643336623638
|
||||||
66613538393466666630363333643730653239393435616634303430396635383631613439623433
|
34333862303133313336303163343031376535346235343164383535633666373332343365386634
|
||||||
36646431393865666162373232343335356366366633633264326639643434396234313863333163
|
38363937343061376435313330323566366539323733363266653665623064356532323464633531
|
||||||
63396534623931633833656565396635333133376165613031663831633564663061656131303564
|
31646539626339643263333166636565666362373564643332376436636238633837376436356335
|
||||||
61303132666264636139313738643161313134643733633366376538366135663135333333333564
|
39366561366537386130613737643036303034333137373234393133393439656563343463626564
|
||||||
64366262353837363061653663616265393264373230346330636465336439623063636639356136
|
64353666373834356336336131613438623263663731343462623539623830343538393336643961
|
||||||
65383638643961326661396336373163643832366561363764626461623662333436373136616437
|
38633962393932363737653564353935666136623063333131663335646263383365616262386337
|
||||||
30316537653432356133616338353165633462643634323563306366343965326635363863316232
|
61353537636330333166383364386234626264373366633233313733636539633733646363376562
|
||||||
61633135643861333635383464383937306236626632366235363433313335663431366531356337
|
36356537393832313465626230356332393634393138623063623438356235633761643465383565
|
||||||
37303465323638383930336138356665343966336137356137656564303733373565366162343330
|
66623262616433383032396465633161663663623761643039343066326464353832353165623736
|
||||||
38326366653733376138356339313564616165626235356363343430353239616339656239323964
|
64393830643936323131326635366239383239643864313264333430353863663634626366663236
|
||||||
31643734653263653461333135386261646265323134633334376262323330396634643764323635
|
61653630356465346239363338323131346263373262646331653561663635343739653930373332
|
||||||
30336262323035613338333166353364333836623865393132613338393237363734616330366463
|
63643930356533643066313132623235623066393231653834363032303632663862346637366638
|
||||||
64646163303337323531636532383438356237306337656439663565643032633462316366663164
|
64646339373466333630343936306531656438323539303334346665306534303063383963376161
|
||||||
33613039326337353531303831313136653539353261373930613030383134653261363833653439
|
33313532656133386232663432386631643335666562613635623938636564393065643737373138
|
||||||
31343662623035393238646263633066653362323434306137633339393330376462356139333362
|
63336264373363663132616136636231323464353134663233363135663061333562333135633630
|
||||||
35363436356530363134663064653031376561343732346262383333353733363136396262643135
|
66313137353362613534383832393432333531333730386633633631666139646332343261383635
|
||||||
31326566303535343833326562376464643632363434323839366366626134303830323563633237
|
33623334386131353265396532353330346231666430343632323633373331376330643538646636
|
||||||
37313964353033316163303738636632346137353437333463303135323631383132623133663130
|
65366164663033303766663965633764633366336434613031386534353735336634343733613537
|
||||||
32373163393861366137303138363134653534613236636439623731393837306130626638343134
|
33303932336434306564363233646333393863356139656664393330653564633930646233663038
|
||||||
39313532386338343662333134353761653162663665396664366239633536613132313735373334
|
66363030666331333662343662623262343434613062333732663361346164633135343539313531
|
||||||
37613161383633653861376433633632333163653439633938386137313632396137616337373465
|
32383237323239663431623937383439323433393032383061623030363963373339643930323435
|
||||||
65383238396439666537313833663364333731613434333739393161363437306665363834653761
|
38343339343332633139306335633566373831346231643633363461623766313632373832343436
|
||||||
34303464386633633163353636643964393233383232623765373239376633393139326630653765
|
30653433643133303733613866303063316661346564336436643630663936643430393231643237
|
||||||
62646439646534376234323661383063656463313437323231333165626163626262626562376338
|
62636131643832613862653464383237643035313039333430656439623231363465333762613061
|
||||||
62646362346261313738323830613037663035666361386139666432613230346334323063326239
|
66313766633032353239653235633532616235633562333431353037643435343763663565316536
|
||||||
65303065343061613736343663363630336333623439383032313137616131623933323636306331
|
36333833636237393639386362656365653639396139386462323435613136373137373331383231
|
||||||
34636130626338303039356137353532346562363531623936316162336663306437386532363236
|
61653139653233373962393835656139313833656433363764366161663964346562343763313666
|
||||||
36333661316161613237343032623764396435346632363963643438316430666539393566353939
|
32643331363931303665333262333761303262393939316639373132666430626264366265373733
|
||||||
33333234313839636537366465356364303438313830663261373563346538626432313139303030
|
66316138383033636431366664393238633433653238373266323137643933366539343563623564
|
||||||
33333066626463663663643833323764643737386162663766356665643064313263376434353038
|
34616233336435656265353235643962663937646234336435653765366462316434666431383266
|
||||||
37643630643737663566653562353261333734636262626437393239383063613661643166626630
|
30626638383233623833356434333164333365633962303131306364653133313236333861323839
|
||||||
31313564346239396561326162333534376264616435313762623032636432363832383630343964
|
37313634633838303232343465333737613733653933323930646237333431666232383235613563
|
||||||
30343663643935633465393465626131633931623930653962303830333065363435383237653566
|
32653866653533616164306435346336396363626633303932363331356362656461313130623331
|
||||||
65646632376330306437663334313932653230653562356338663366616463303466366263366137
|
37333064356236303265626637393462303366363938633361646231326539363666616135666661
|
||||||
64633934626339633235386630396561376130373763313137386531356637633863393035306634
|
36626264373532356633393465363730383565306636626565373265316436356434363833363766
|
||||||
65353432323235363135633832373032623837376333346131303162303464616234313062316563
|
31653462333661313432343634376530333230343535393133323033663132393436303238356166
|
||||||
64646634633963663032613533636665333335656539323238623362306363313835626632306236
|
35353332613433376337343936303066666639306432343730333665383331373234353562613764
|
||||||
30663637356463363530316434316639326639633539333335633330333834643035353932313638
|
62313865303161393864656233383832386138366133373736326530646632316162626432636534
|
||||||
64356565653065666131373538356462306633343161376537323762313666373235353236313963
|
34623232306364333031616637343036323835336532616432393238653665613766356434313161
|
||||||
65613561633266306632616538616461626532666435663038646138386430376164663766363138
|
37666230303066333662653339353064663766373761656463613363623234653534313132383365
|
||||||
35316262393065653739323035666531333330326235386133383834383865356635666537333533
|
65376430623734613735663866613837396232633462366563666463333533383932356462386165
|
||||||
31376138353231313262646334386566376264323066373934666363313431643738383064666437
|
65323134333838323534643237366133326234323039373263663032653035363133653664616266
|
||||||
36656437313039656666373530346534393735353163646635663839326366643333393665626464
|
33353966623939333962633366383163613630373537326562303638303064333736353831383634
|
||||||
36616637303631653661373433653865323634363065303433386534363064356564636465366265
|
34646663643034323035356131333537613966396232323363366262366535373632663931306237
|
||||||
31333064383233636538393032376234663663353162343530376631356533653231303730396465
|
31313461653430343461356164326466383165333833633266333536326537663964613832326435
|
||||||
33366162376464633633313664303939306330613865663431653037303061633130626635653638
|
62633061666165383966633264376439633333663766323864313564373962373664346238353432
|
||||||
66626264363333376463386666313663333964333137333231303361616533393236373861656534
|
38663430386665336533303066353130336334336532643866623036373437303064643234353539
|
||||||
32326335306566623332396638383133353434363565316432353963353062313662326361336537
|
34356664383464303361326336633839313634626365333137626164623261646561646137326537
|
||||||
34396632656234333263663831326566353434316234613365316132363730643665373761666562
|
63376330373432356661383133343230366338386164386630623266376461663463346136366666
|
||||||
31393565653663653731633333633730326265376135666162656132623238333765333363653130
|
32663633313462643831396365373464663365663737323432626563643633393064386338376465
|
||||||
61353632313532616266363139336162336565356365316531336364623930636430353831623233
|
38636538373834373761393331353837356165303562633563636538656135653763646236396162
|
||||||
61616131313438306633333066613764313161333934316139633738623164623564646365663566
|
62343137323036363532643836326364313137363162633663353532383732363634626632343430
|
||||||
66356464376133363137313036623930373362306166623838373131313330393837396261656561
|
65393436623337326430323630636263363239396361656663656631386431663230363631613465
|
||||||
66396233313530643164353264656563383632363139333262626532376562613630643437666266
|
39343733333033383134343139636633333034366532353737663565326334323338326363393236
|
||||||
66656335656634613138316138643666623430363833663035616138336461303035633731636262
|
31396231623361323866396139623331616438646361393362616630313563393537353031643935
|
||||||
36393939333765346239666433323032323361343934656463396365333366623337316663396263
|
31356464353035366361656566346632383061376138386662313736376338363331373530336332
|
||||||
36616431626633663963636135643833666234613830366434636532373031343263316436306162
|
37346664623461356635656566363936613339313135303764383636373938373932623632303435
|
||||||
39356365376561643665323866656465313434623138326238353662653735613565623264333336
|
33383838303639343730626433333337313135306463663839323735376132353838306162313864
|
||||||
61393763363862613766653064636130323732663466366133666361636339356464313037353462
|
65313939343466623039373462306533336532616365343639623765316532396236393239303265
|
||||||
63633936653235656538383433393065393162643034393538666433616131343462346235393164
|
30316133616364653638386635303964366161303161396562373835656339666439313231386530
|
||||||
39353663373338626665663563663162633430343330373430376336326432346233663365376533
|
65656438623536393032633064363631613265383239613563613533396263393131623161373662
|
||||||
32656465343538643137326366653232343530363834383831386634366262303333636261353863
|
65306564666235376561643462613434653839373237663964343333366231306166623661663639
|
||||||
32633437343432653936643766363338636535613532323362656435613363393238626466303861
|
33316465666431636439316661646337643763306466323165643735353162333361376534343362
|
||||||
38633861333638613466306338613932353964393365356637306261626535323732316362623731
|
30326336643537643932336362313635373865323531663730663436333461633536323561623763
|
||||||
33313963623439613939333639346461663338373334396165636231666266613065323731373964
|
35353137633265353930626535306234636338326335346664383735356132643363366362643864
|
||||||
64313133383435333935376531313432663766633133633863356563663535333263636237386136
|
66323734313839653330396266346537633035363538663964643839366533333438643239306561
|
||||||
61653963633166383135333436646465383536373039383538326366636634313061613730653962
|
62656639366565323739373164653536316664326664393530633236396334363731313237643636
|
||||||
37623962643866396637336231363038373465393637356463656566666661313130313863383233
|
65643737666134653331383737633531643463356162306231326261653162316264383961396333
|
||||||
37343636346535363832626365396262303862393535336565393635663637323730373564336634
|
34303335336465613230343133626364633935393139366263613533343230646561363736323536
|
||||||
37363036323733306535336366373630356531353737303165376530656433626634343365626239
|
64313661343061623864326331653032303661393834643435396162363830353933653038613965
|
||||||
64346136363030663862313431653761666432393933366665346361626361623039326434633835
|
66383039316165656130316363356533653065303866616630636135666265643639376336336235
|
||||||
32666538653037613361343536383634643762356234366433663639653461303933306434333864
|
32666539383638623534356539653236366265326634396335663166313461353931653634313434
|
||||||
37386436393465323139306161333738383265323436376536656264356230303163326134323864
|
35353461613139626463346362363636623363313965376437643865343132346530396333326234
|
||||||
63396331666431666464656161633466333764653631623131646566303366333030653834333335
|
33636237326565643766343437663330646632393538643865373664353435663530376333386233
|
||||||
31323365353239366232643863386365633861376235643034303563613363663661616564363663
|
38666266386336313234303435326138346330653763326462333331323233653462353264346163
|
||||||
63326562613365653539383336383339646164623864323830653434623365393432666466323134
|
38666462633066333136343233663137313439663138663037663537633434643561316362643439
|
||||||
33626330373361393734656632393232363866613863373135636537613934343065306265623964
|
30383637366237383937373161623131356136623230386131623166363365326139373235636538
|
||||||
34643765636165393336356630353663343065333431656164363638646233663762346536343362
|
37343861656363656662373262336663653233663639313031613962653562323739616336656539
|
||||||
65653364343537383336373933313464663464653465383830363631316336303464313731356230
|
38636333343562663165623537376366343863653764363361383161663361363531326335313633
|
||||||
34336130323766386465373162346535396565346630353734303937396130656132376331326563
|
39333162626462613935383534373566336665303631396135333463663432616437356532356465
|
||||||
36386339383338346533646331666262396432336434646333653664326635386238333763626637
|
37316334613365333037316365373731386239323363643231653839306539376664623366653934
|
||||||
31363464306465666339316436323265623437636533643431363161323139653065323534636533
|
31373065646362366562306130346366653366333039633237646539326665646262393231636137
|
||||||
64386334353439373133313937343234373963353331646233346432646430636530663336316134
|
61376439306630623930306332356566363833373635646562386232306431306466363139386430
|
||||||
66303337313034396232643531643262343036313762633165353665653938313665386363353865
|
64383439366138316130636234663263343930316639383738303937363732316366303332643837
|
||||||
66333166303636626565613136653365313763303263313239333033353638616566656134396131
|
64336364633336366562303131383831613331346334353064386161363366623565653236313337
|
||||||
38356434343931303134303362313363343634613361353538636634336332373132356165326163
|
37656362396231616333646334306232343030366139626339386464326564636632666138313132
|
||||||
30386130326239366532363962316435663862393836326439623862366166376234343439306465
|
62613439316231336635623537303234333139366431663965386637653237376463636136613465
|
||||||
36346639623939353232366333643963646336383833386565643435393734653936313638663930
|
32633666383863643266663536353064663231663033373637616564376230636261383532383837
|
||||||
32323065343737663564333961373034393261613862333431663562353964666561643831316432
|
31623062616466313031306630373839623431376239653237623863666331316130346661316230
|
||||||
35313832356639333937333266306166656538643065386639346337306134613536356137316331
|
36333164323033343162653464633461363632383634323431616332366461303166316361383937
|
||||||
38376434666332366531393639303561663934353130333161636530383932653236313530616531
|
64313662613362613339346339323038363166666461663861613062393765666664396431363735
|
||||||
61656664626663373164343863333039356362343034326131376666623264663732303734366363
|
32373366373964653432323536343163626361393935376330303563386465356238353231653636
|
||||||
30306430353732616131346637626332656434393163313661356465393263393235396662623962
|
65663839323432663561306464356165326331656231656662616562303661316238626136303439
|
||||||
62643538623331646265643561623366383937313136383939366164613235666234663137653432
|
65353439633865656630313761353665363231346262633134393638646661643231663134343066
|
||||||
34316138643139336331356663333632656539653632626136613431393736613630353237356164
|
62666335323563353863623638343663633565653466376335396238366531313165366331656430
|
||||||
33623632643335663163656236633134343464353837346237316162346634633336663564656531
|
65643862653265313136353661623633316132353638373763313036346362616262363763306539
|
||||||
39373730346130363963376463326238366235613539613466653139306237343164336462353236
|
64623563393435626636396132616137313962363636326533393662373537636137373637356666
|
||||||
39323361636333353661633863663162633563343937366461346338363061623730633537626562
|
30373862353966616333393861323130306366636432363661613639636137316430613032613666
|
||||||
30353938383664333861366431343033313961376436363065373430353736343563313531386663
|
34333635356136313337343730393839373237363334333466373231396530326438353339363464
|
||||||
37313534303564333237616331396437376436383833373936376664666366373235613533663239
|
34663038613165333335376630346535336138383238306339636563613964363665643334613836
|
||||||
64653863613531356666646233393533646131333961343730663461346235633961306263343831
|
66616234336634653237623766343466613632383836623630633763613265323638653437333665
|
||||||
64386332653330323937643266373437633465363933653833343930616134626566363339366362
|
65623733376631303261623363306139626539393631393435623164316137313835653138376137
|
||||||
36356163333730656233653431326430326566386264343330666131393166323537623137396237
|
62643737616564333562326434383336393563386266383065616361643563616439666536363563
|
||||||
65386234653231666631366533383762643830333261363532666138386263643662633932626335
|
65373933343438376233626564376131396130323335333965666134646132646230396639623638
|
||||||
66303363613035643931393933303035323566373634663037313338616132373162366334373962
|
39646437383537633362653966623832303535313435393064616266646335663136613061613631
|
||||||
33666463613435396331326565353433336361303562326562663035313639333232333430373266
|
31633639383437616635633066386163343733666439353565336237366334373838333730336434
|
||||||
65383235356132353838636565636436356361653831356430663935613766613237366564316566
|
36393830616431656136396465663132343530333735323138653835333730393135393738353865
|
||||||
37396130393363386566306162346466326165353863636633306335383265306139396339383866
|
32376664323961646361653639353439316164623962393737333634383266323661626539383464
|
||||||
34326335323962633032386162623033353036643437313832323166363764653339343638343964
|
62366439636236373732666661393739616239333135393732623739636632386136656638393032
|
||||||
66626662326234306362656162336538353131366337643761643930306163333661653062663832
|
64623261633237333936353466633836343866643661343334313064386432323061316164346565
|
||||||
61303963623433313565633235306132366663336662616232613339366363373934613631623431
|
38653734316538653832313432323434666639346666396630363336363231333561303861363536
|
||||||
34323736383366333032343364373533363761323338346163323836653235653136646162306166
|
66343465323936383533353733333431313261336332363964366461656239356230366533646635
|
||||||
65333734623663346233343961396566313838653036396430396134393839326535363237363638
|
34363565383137393662613263343732656437363739323339643038646439316139613565613331
|
||||||
38333232333863396334366561303136333863356666656335633630616531363766343535616533
|
35666635316639623932633765303131613132346637643263633664326637633433623137383831
|
||||||
35656166303837653365303436623431613931336331356531666665346562613263363666626238
|
35666235653466396432323031353162393035373235343661333664633866323936373034306163
|
||||||
62626236323863383366643162356462306163653032626130333863656337623136646439316337
|
34396232316232663762323138643334363362343538343335653333386433386632653262393235
|
||||||
33306432663134383038646133346131333732633932383239643733643138303434646565663266
|
36323430316166363330363861386339623631373062646339396231356566336632363639616531
|
||||||
34616265383733343963323538656138656331396438616133393063356638633965323363653066
|
65333237376564363936336132323733323237396331306264643239363633666439363432313236
|
||||||
65353837333363613762333839313631373137363064383830353565333832356162323862393030
|
38663138623531666337346332633366633234636230343066363437623561393662636432343965
|
||||||
35373038613133643466636537626437393837633865363566343565626633376262373766613738
|
65616132363733393262643137653238396364323637623033643564333533363032633834633563
|
||||||
39343334336238363131373762646564653839623531323066356430326263376534373664363331
|
64313061303063346636633734353338396333613933313632323935636131623364643066303632
|
||||||
64373735383933303638303661333964333464306338613363326261623438336530636262373766
|
37366464323964336231653233313261353336636138376461636434373933353166323937386662
|
||||||
35346339643939666162386232666236326131366366303432393838326239313730323431376231
|
66333037633038396333663661626266643032346331333966363763643464306535653231373436
|
||||||
39363032616666393431326533643865643937363937356431623763363037373333653266376561
|
32623064633235393265653865613431626535616439646165646631653430663630306634626232
|
||||||
63323462363063343234373534663063353865363037383932386231313338343239653131633561
|
39393661376164353934323934643137613239303864313465326264376265623437326663303035
|
||||||
34623439396232633265616438623562666333303932396366663330326565363736633461333463
|
65616463633161656334646664613339646633623361363737663639333361613062396665656132
|
||||||
66346537323061306662323062393061353565393165363532306439343262343632616465363364
|
32633838313633653465633163323531376438626661653966393462316666313538666362303561
|
||||||
30376331346430313536313963333136663833323064633631653935326366633862336163316538
|
64396563386137333538373137633065303732373039366533336230393561316330666633383433
|
||||||
33383434336666303434363236396662366664393637656462363331356631613332353766636663
|
36333932333133313637663733653031623266666566346464393530653035656437616266373230
|
||||||
62323264336235306532343065323834313730353237616463373766303439663533336366363565
|
32373736636464356333613438353437323636363962386464393838626564636434663063613334
|
||||||
35646461636263646633343634323735383235376330616334373937646165623639363663353361
|
62326565353239343031633466303963366362653061366432636662326664316334623036626165
|
||||||
65613034353736633332663333616564356265323731613537393430633137333337643663323137
|
30346365313137663234323930633064303335643464633737316164373266623031313839333034
|
||||||
31623732663331653935316337306433333633353565343265666333363864346562363961333439
|
39336231666630616232346363396332363663396335386534373235663032376166613763393465
|
||||||
30656136636661396335623566386362333861616663393738626632633537613564636261383138
|
36323261316465623336366434653737323236313739623438616338666536633431616265313032
|
||||||
3233
|
33663335623366616231366436363037353464626233343438653061386539343830633139343865
|
||||||
|
62613134333762386436303966353830313761396331623262656630616565363239333766626331
|
||||||
|
39313937316238363866366365633434333233643664356533643839373063323436626435643937
|
||||||
|
30303363346334663765336566373865356361623935623736313331396133313637313765386366
|
||||||
|
65343863633865316332663463663937623762316138346462653435613466323264663730656433
|
||||||
|
37373662383436386233393539303536613031633537326465333030646136666532363935393634
|
||||||
|
33343735376634363763616639626339643431303863663964653132336236636538613035396464
|
||||||
|
66383437346664633536303162353430666638636439366539356263303934373933313131393162
|
||||||
|
35353837633232323330643736376162636232303830313037336263323536356531363338636661
|
||||||
|
30653162663931626636343036306236393063326338373466633330343363616666366261626638
|
||||||
|
37376539613564386339373434616139623237623461383434613738626433323065333766306431
|
||||||
|
33343638396263376537396163613962636334646631346363393366353665356132306263663831
|
||||||
|
34353665356563636462333738383936343539316435646361623633316365643935393538653738
|
||||||
|
34376530623837313330353035633761336336666132623334323839626666366362653836643632
|
||||||
|
38383637343431633235656337353331313863373930623636333235656137633461303739396563
|
||||||
|
39396433343262383136663636343231643739316664363839656233623633323638363236343435
|
||||||
|
32323739353138306530616531376636323336356664656533313961356535333061353732643337
|
||||||
|
37313432323231333066396362326335613935356235366265646563623232353866336565323237
|
||||||
|
30643766303738363039383566656535343864373837353861666265623963623436376664663966
|
||||||
|
61363532393262666636616538626434366338303832646631626134336134313131616166616136
|
||||||
|
33663734336336613738333833653130613561366633343561643839323266393038356539383230
|
||||||
|
63623834316363313232366638306262623633363366303136336536336663353865303435383333
|
||||||
|
63316434616666656466343737626233326161386462363631643531356131376161633466303736
|
||||||
|
38383833663965663835356635323537626536306437323861366635386562353063373132326465
|
||||||
|
63343234303633393138343862336662663361653930636461326435303635623562373634363032
|
||||||
|
6661396564633461353336313466366163393535646238326639
|
||||||
|
|
25
host_vars/vpn-ng-backup.adm.auro.re.yml
Normal file
25
host_vars/vpn-ng-backup.adm.auro.re.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
wireguard_endpoints:
|
||||||
|
- name: ovh
|
||||||
|
addr: 192.168.0.2/31
|
||||||
|
private_key: "{{ vault_wireguard_secrets.edc.private }}"
|
||||||
|
peer:
|
||||||
|
public_key: "{{ vault_wireguard_secrets.ovh_edc.public }}"
|
||||||
|
allowed_addrs:
|
||||||
|
- 0.0.0.0/0
|
||||||
|
- ::/0
|
||||||
|
keepalive: 5
|
||||||
|
endpoint: 92.222.211.198:5413
|
||||||
|
|
||||||
|
bird_router_id: 10.128.0.124
|
||||||
|
bird_router_prefsrc: 10.128.0.124
|
||||||
|
bird_ospf_ifaces:
|
||||||
|
ens18:
|
||||||
|
stub: true
|
||||||
|
ovh:
|
||||||
|
type: pointopoint
|
||||||
|
cost: 4000
|
||||||
|
ens19:
|
||||||
|
type: broadcast
|
||||||
|
cost: 1000
|
||||||
|
...
|
25
host_vars/vpn-ng.adm.auro.re.yml
Normal file
25
host_vars/vpn-ng.adm.auro.re.yml
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
---
|
||||||
|
wireguard_endpoints:
|
||||||
|
- name: ovh
|
||||||
|
addr: 192.168.0.0/31
|
||||||
|
private_key: "{{ vault_wireguard_secrets.gs.private }}"
|
||||||
|
peer:
|
||||||
|
public_key: "{{ vault_wireguard_secrets.ovh_gs.public }}"
|
||||||
|
allowed_addrs:
|
||||||
|
- 0.0.0.0/0
|
||||||
|
- ::/0
|
||||||
|
keepalive: 5
|
||||||
|
endpoint: 92.222.211.198:5412
|
||||||
|
|
||||||
|
bird_router_id: 10.128.0.224
|
||||||
|
bird_router_prefsrc: 10.128.0.224
|
||||||
|
bird_ospf_ifaces:
|
||||||
|
ens18:
|
||||||
|
stub: true
|
||||||
|
ovh:
|
||||||
|
type: pointopoint
|
||||||
|
cost: 2000
|
||||||
|
ens19:
|
||||||
|
type: broadcast
|
||||||
|
cost: 1000
|
||||||
|
...
|
37
host_vars/vpn-ovh-ng.auro.re.yml
Normal file
37
host_vars/vpn-ovh-ng.auro.re.yml
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
---
|
||||||
|
wireguard_endpoints:
|
||||||
|
- name: gs
|
||||||
|
addr: 192.168.0.1/31
|
||||||
|
listen_port: 5412
|
||||||
|
private_key: "{{ vault_wireguard_secrets.ovh_gs.private }}"
|
||||||
|
peer:
|
||||||
|
public_key: "{{ vault_wireguard_secrets.gs.public }}"
|
||||||
|
allowed_addrs:
|
||||||
|
- 0.0.0.0/0
|
||||||
|
- ::/0
|
||||||
|
keepalive: 5
|
||||||
|
- name: edc
|
||||||
|
addr: 192.168.0.3/31
|
||||||
|
listen_port: 5413
|
||||||
|
private_key: "{{ vault_wireguard_secrets.ovh_edc.private }}"
|
||||||
|
peer:
|
||||||
|
public_key: "{{ vault_wireguard_secrets.edc.public }}"
|
||||||
|
allowed_addrs:
|
||||||
|
- 0.0.0.0/0
|
||||||
|
- ::/0
|
||||||
|
keepalive: 5
|
||||||
|
|
||||||
|
bird_router_id: 10.132.0.254
|
||||||
|
bird_router_prefsrc: 10.132.0.254
|
||||||
|
bird_ospf_ifaces:
|
||||||
|
ens19:
|
||||||
|
stub: true
|
||||||
|
ens20:
|
||||||
|
stub: true
|
||||||
|
gs:
|
||||||
|
type: pointopoint
|
||||||
|
cost: 2000
|
||||||
|
edc:
|
||||||
|
type: pointopoint
|
||||||
|
cost: 4000
|
||||||
|
...
|
3
hosts
3
hosts
|
@ -35,6 +35,8 @@ services-web.adm.auro.re
|
||||||
mail.adm.auro.re
|
mail.adm.auro.re
|
||||||
wikijs.adm.auro.re
|
wikijs.adm.auro.re
|
||||||
prometheus-aurore.adm.auro.re
|
prometheus-aurore.adm.auro.re
|
||||||
|
vpn-ng.adm.auro.re
|
||||||
|
vpn-ng-backup.adm.auro.re
|
||||||
|
|
||||||
[aurore_testing_vm]
|
[aurore_testing_vm]
|
||||||
pendragon.adm.auro.re
|
pendragon.adm.auro.re
|
||||||
|
@ -58,6 +60,7 @@ matrix-services.adm.auro.re
|
||||||
serge.adm.auro.re
|
serge.adm.auro.re
|
||||||
passbolt.adm.auro.re
|
passbolt.adm.auro.re
|
||||||
vpn-ovh.adm.auro.re
|
vpn-ovh.adm.auro.re
|
||||||
|
vpn-ovh-ng.auro.re
|
||||||
docker-ovh.adm.auro.re
|
docker-ovh.adm.auro.re
|
||||||
switchs-manager.adm.auro.re
|
switchs-manager.adm.auro.re
|
||||||
ldap-replica-ovh.adm.auro.re
|
ldap-replica-ovh.adm.auro.re
|
||||||
|
|
6
roles/bird/defaults/main.yml
Normal file
6
roles/bird/defaults/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
bird_ospf_hello: 2
|
||||||
|
bird_ospf_retransmit: 2
|
||||||
|
bird_ospf_wait: 10
|
||||||
|
bird_ospf_dead: 30
|
||||||
|
...
|
6
roles/bird/handlers/main.yml
Normal file
6
roles/bird/handlers/main.yml
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
---
|
||||||
|
- name: Reload bird
|
||||||
|
systemd:
|
||||||
|
name: bird.service
|
||||||
|
state: reloaded
|
||||||
|
...
|
20
roles/bird/tasks/main.yml
Normal file
20
roles/bird/tasks/main.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
---
|
||||||
|
- name: Install bird
|
||||||
|
apt:
|
||||||
|
name: bird
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: Configure bird
|
||||||
|
template:
|
||||||
|
src: bird.conf.j2
|
||||||
|
dest: /etc/bird/bird.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: u=rw,g=r,o=
|
||||||
|
|
||||||
|
- name: Enable and start bird
|
||||||
|
systemd:
|
||||||
|
name: bird.service
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
...
|
42
roles/bird/templates/bird.conf.j2
Normal file
42
roles/bird/templates/bird.conf.j2
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
log syslog all;
|
||||||
|
|
||||||
|
router id {{ bird_router_id }};
|
||||||
|
|
||||||
|
protocol kernel {
|
||||||
|
scan time 15;
|
||||||
|
import none;
|
||||||
|
export filter {
|
||||||
|
krt_prefsrc = {{ bird_router_prefsrc }};
|
||||||
|
accept;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
protocol device {
|
||||||
|
scan time 15;
|
||||||
|
};
|
||||||
|
|
||||||
|
{% if bird_ospf_ifaces is defined %}
|
||||||
|
protocol ospf {
|
||||||
|
import all;
|
||||||
|
export all;
|
||||||
|
|
||||||
|
area 0 {
|
||||||
|
|
||||||
|
{% for name, attrs in bird_ospf_ifaces.items() %}
|
||||||
|
interface "{{ name }}" {
|
||||||
|
{% if "stub" in attrs %}
|
||||||
|
stub;
|
||||||
|
{% else %}
|
||||||
|
hello {{ attrs.hello | default(bird_ospf_hello) }};
|
||||||
|
retransmit {{ attrs.retransmit | default(bird_ospf_retransmit) }};
|
||||||
|
wait {{ attrs.wait | default(bird_ospf_wait) }};
|
||||||
|
dead {{ attrs.dead | default(bird_ospf_dead) }};
|
||||||
|
type {{ attrs.type }};
|
||||||
|
cost {{ attrs.cost }};
|
||||||
|
{% endif %}
|
||||||
|
};
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
{% endif %}
|
7
roles/nftables_router/handlers/main.yml
Normal file
7
roles/nftables_router/handlers/main.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
---
|
||||||
|
- name: Reload nftables
|
||||||
|
become: true
|
||||||
|
systemd:
|
||||||
|
name: nftables.service
|
||||||
|
state: reloaded
|
||||||
|
...
|
41
roles/nftables_router/tasks/main.yml
Normal file
41
roles/nftables_router/tasks/main.yml
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
---
|
||||||
|
- name: Install nftables
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
name: nftables
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: Create nftables.d directory
|
||||||
|
become: true
|
||||||
|
file:
|
||||||
|
path: /etc/nftables.d
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: u=rwx,g=rx,o=
|
||||||
|
|
||||||
|
- name: Configure nftables
|
||||||
|
become: true
|
||||||
|
template:
|
||||||
|
src: "{{ item }}.j2"
|
||||||
|
dest: "/etc/{{ item }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: u=rw,g=r,o=
|
||||||
|
loop:
|
||||||
|
- nftables.d/10-vars.conf
|
||||||
|
- nftables.d/20-blacklist.conf
|
||||||
|
- nftables.d/30-rp-filter.conf
|
||||||
|
- nftables.d/40-signup.conf
|
||||||
|
- nftables.d/50-filter.conf
|
||||||
|
- nftables.d/60-nat.conf
|
||||||
|
- nftables.conf
|
||||||
|
notify: Reload nftables
|
||||||
|
|
||||||
|
- name: Enable and start nftables
|
||||||
|
become: true
|
||||||
|
systemd:
|
||||||
|
name: nftables.service
|
||||||
|
state: started
|
||||||
|
enabled: true
|
||||||
|
...
|
5
roles/nftables_router/templates/nftables.conf.j2
Normal file
5
roles/nftables_router/templates/nftables.conf.j2
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
flush ruleset
|
||||||
|
|
||||||
|
include "/etc/nftables.d/*.conf"
|
81
roles/nftables_router/templates/nftables.d/10-vars.conf.j2
Normal file
81
roles/nftables_router/templates/nftables.d/10-vars.conf.j2
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
## Interconnexion
|
||||||
|
|
||||||
|
# Réseaux d'interconnexion
|
||||||
|
define interco_v4 = {
|
||||||
|
{{ nftables_interco_v4 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
define interco_v6 = {
|
||||||
|
{{ nftables_interco_v6 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## Administration
|
||||||
|
|
||||||
|
# Réseaux d'administration
|
||||||
|
define adm_v4 = {
|
||||||
|
{{ nftables_adm_v4 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
define adm_v6 = {
|
||||||
|
{{ nftables_adm_v6 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Serveurs de centralisation des journaux
|
||||||
|
define syslog_adm_v4 = { 10.128.0.51 }
|
||||||
|
define syslog_adm_v6 = { 2a09:6840:128::251 }
|
||||||
|
|
||||||
|
# Adresses des bastions autorisés
|
||||||
|
define bastions_v4 = {
|
||||||
|
{{ nftables_bastions_v4 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
define bastions_v6 = {
|
||||||
|
{{ nftables_bastions_v6 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## Services
|
||||||
|
|
||||||
|
# Réseaux de services privés
|
||||||
|
define svc_v4 = {
|
||||||
|
{{ nftables_svc_v4 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
define svc_v6 = {
|
||||||
|
{{ nftables_svc_v6 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## Adhérents
|
||||||
|
|
||||||
|
# Réseaux des adhérents
|
||||||
|
define members_v4 = {
|
||||||
|
{{ nftables_members_v4 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
define members_v6 = {
|
||||||
|
{{ nftables_members_v6 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sous-réseau d'inscription des adhérents
|
||||||
|
define signup_v4 = {
|
||||||
|
{{ nftables_signup_v4 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
define signup_v6 = {
|
||||||
|
{{ nftables_signup_v6 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Hôtes déclencheurs d'accès à Internet pour inscription
|
||||||
|
define signup_triggers_v4 = {
|
||||||
|
{{ nftables_signup_triggers_v4 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
define signup_triggers_v6 = {
|
||||||
|
{{ nftables_signup_triggers_v6 | join(",\n") | indent }}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
## NAT
|
||||||
|
|
||||||
|
# Interface sur laquelle appliquer le NAT
|
||||||
|
define wan_iface = "ens18"
|
||||||
|
|
||||||
|
define members_nat_v4 = 92.222.211.198
|
||||||
|
define any_nat_v4 = 92.222.211.198
|
|
@ -0,0 +1,31 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
table inet blacklist {
|
||||||
|
|
||||||
|
set blacklist_v4 {
|
||||||
|
type ipv4_addr
|
||||||
|
flags interval
|
||||||
|
}
|
||||||
|
|
||||||
|
set blacklist_v6 {
|
||||||
|
type ipv6_addr
|
||||||
|
flags interval
|
||||||
|
}
|
||||||
|
|
||||||
|
# Compteur des paquets ignorés car les adresses étaient en liste noire
|
||||||
|
counter blacklist {}
|
||||||
|
|
||||||
|
# Cette chaîne est appliquée très tôt (avant le conntrack entre autres)
|
||||||
|
# afin de limiter autant que possible l'impact des hôtes en liste noire
|
||||||
|
# (notamment en cas d'attaque par déni de service)
|
||||||
|
chain filter {
|
||||||
|
type filter hook prerouting priority -310
|
||||||
|
policy accept
|
||||||
|
|
||||||
|
# On ne journalise pas pour limiter la charge sur les serveurs de
|
||||||
|
# journalisation
|
||||||
|
ip saddr @blacklist_v4 counter name blacklist drop
|
||||||
|
ip6 saddr @blacklist_v6 counter name blacklist drop
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
# Simule le comportement de rp_filter=1, mais avec support d'IPv6 (ce qui
|
||||||
|
# n'est pas le cas de l'implémentation du noyau)
|
||||||
|
#
|
||||||
|
# https://wiki.nftables.org/wiki-nftables/index.php/Routing_information
|
||||||
|
# Le "eq 0" n'est pas très joli, mais ça semble être la façon
|
||||||
|
# "normale" de le faire
|
||||||
|
# Voir : https://netdevconf.info/1.2/slides/oct6/08_nft_netdev12_florian.pdf
|
||||||
|
table inet reverse_path_filter {
|
||||||
|
|
||||||
|
chain filter {
|
||||||
|
type filter hook prerouting priority -300
|
||||||
|
policy accept
|
||||||
|
|
||||||
|
fib saddr . iif oif eq 0 \
|
||||||
|
log prefix "rp-filter" group 0 counter drop
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
48
roles/nftables_router/templates/nftables.d/40-signup.conf.j2
Normal file
48
roles/nftables_router/templates/nftables.d/40-signup.conf.j2
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
table inet signup {
|
||||||
|
|
||||||
|
set triggered {
|
||||||
|
type ether_addr
|
||||||
|
timeout 24h
|
||||||
|
}
|
||||||
|
|
||||||
|
set allowed {
|
||||||
|
type ether_addr
|
||||||
|
timeout 30m
|
||||||
|
}
|
||||||
|
|
||||||
|
chain trigger {
|
||||||
|
log prefix "signup-trigger" group 0
|
||||||
|
add @triggered { ether saddr }
|
||||||
|
add @allowed { ether saddr }
|
||||||
|
}
|
||||||
|
|
||||||
|
chain filter {
|
||||||
|
# Si l'adresse MAC est temporairement autorisée, on ne bloque pas
|
||||||
|
ether saddr @allowed return
|
||||||
|
|
||||||
|
# Si l'adresse n'est pas autorisée (cf. règle précédente) mais qu'elle
|
||||||
|
# a accédé récemment à un déclencheur, cela signifie qu'elle a déjà
|
||||||
|
# « consommé son crédit », donc on bloque
|
||||||
|
ether saddr @triggered drop
|
||||||
|
|
||||||
|
# Si la machine tente de se connecter à un des hôtes déclencheurs,
|
||||||
|
# on enregistre son adresse MAC et on laisse passer la connexion
|
||||||
|
ip daddr $signup_triggers_v4 goto trigger
|
||||||
|
ip6 daddr $signup_triggers_v6 goto trigger
|
||||||
|
|
||||||
|
# La machine a tenté de se connecter vers une destination qui ne
|
||||||
|
# déclenche pas l'accès à Internet, donc on bloque
|
||||||
|
drop
|
||||||
|
}
|
||||||
|
|
||||||
|
chain forward {
|
||||||
|
type filter hook forward priority -10
|
||||||
|
policy accept
|
||||||
|
|
||||||
|
ip saddr $signup_v4 goto filter
|
||||||
|
ip6 saddr $signup_v6 goto filter
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
181
roles/nftables_router/templates/nftables.d/50-filter.conf.j2
Normal file
181
roles/nftables_router/templates/nftables.d/50-filter.conf.j2
Normal file
|
@ -0,0 +1,181 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
table inet filter {
|
||||||
|
|
||||||
|
chain conntrack {
|
||||||
|
ct state invalid counter drop
|
||||||
|
ct state { established, related } counter accept
|
||||||
|
}
|
||||||
|
|
||||||
|
chain input_from_anywhere {
|
||||||
|
# C'est pas gentil de bloquer ICMP(v6), alors on le fait pas
|
||||||
|
ip protocol icmp counter accept
|
||||||
|
ip6 nexthdr icmpv6 counter accept
|
||||||
|
|
||||||
|
# Wireguard
|
||||||
|
udp dport { 5412, 5413 } counter accept
|
||||||
|
|
||||||
|
# Temporaire
|
||||||
|
tcp dport 22 counter accept
|
||||||
|
}
|
||||||
|
|
||||||
|
chain input_from_interco {
|
||||||
|
# Il faut n'accepter que le multicast OSPF et des trucs
|
||||||
|
# comme ça
|
||||||
|
counter accept
|
||||||
|
}
|
||||||
|
|
||||||
|
chain input_from_members {
|
||||||
|
log prefix "in-from-members" group 0
|
||||||
|
}
|
||||||
|
|
||||||
|
chain input_from_signup {
|
||||||
|
log prefix "in-from-signup" group 0
|
||||||
|
}
|
||||||
|
|
||||||
|
chain input_from_svc {
|
||||||
|
log prefix "in-from-svc" group 0
|
||||||
|
}
|
||||||
|
|
||||||
|
chain input_from_adm {
|
||||||
|
log prefix "in-from-adm" group 0
|
||||||
|
|
||||||
|
tcp dport 22 counter accept
|
||||||
|
}
|
||||||
|
|
||||||
|
chain input {
|
||||||
|
type filter hook input priority 0
|
||||||
|
policy drop
|
||||||
|
|
||||||
|
iif lo accept
|
||||||
|
|
||||||
|
jump conntrack
|
||||||
|
|
||||||
|
jump input_from_anywhere
|
||||||
|
|
||||||
|
ip saddr $interco_v4 goto input_from_interco
|
||||||
|
ip6 saddr $interco_v6 goto input_from_interco
|
||||||
|
|
||||||
|
ip saddr $members_v4 goto input_from_members
|
||||||
|
ip6 saddr $members_v6 goto input_from_members
|
||||||
|
|
||||||
|
ip saddr $signup_v4 goto input_from_signup
|
||||||
|
ip6 saddr $signup_v6 goto input_from_signup
|
||||||
|
|
||||||
|
ip saddr $svc_v4 goto input_from_svc
|
||||||
|
ip6 saddr $svc_v6 goto input_from_svc
|
||||||
|
|
||||||
|
ip saddr $adm_v4 goto input_from_adm
|
||||||
|
ip6 saddr $adm_v6 goto input_from_adm
|
||||||
|
}
|
||||||
|
|
||||||
|
chain output {
|
||||||
|
type filter hook output priority 0
|
||||||
|
policy accept
|
||||||
|
}
|
||||||
|
|
||||||
|
chain forward_to_interco {
|
||||||
|
ip saddr $interco_v4 accept
|
||||||
|
ip6 saddr $interco_v6 accept
|
||||||
|
}
|
||||||
|
|
||||||
|
chain forward_to_members_re2o_ports {
|
||||||
|
# TODO
|
||||||
|
}
|
||||||
|
|
||||||
|
chain forward_to_members {
|
||||||
|
# Les adhérents peuvent communiquer entre eux
|
||||||
|
ip saddr $members_v4 accept
|
||||||
|
ip6 saddr $members_v6 accept
|
||||||
|
|
||||||
|
# L'administration n'a pas accès à l'extérieur
|
||||||
|
ip saddr $adm_v4 drop
|
||||||
|
ip6 saddr $adm_v6 drop
|
||||||
|
|
||||||
|
# Les ouvertures de ports sont générées par re2o
|
||||||
|
goto forward_to_members_re2o_ports
|
||||||
|
}
|
||||||
|
|
||||||
|
chain forward_to_signup {
|
||||||
|
}
|
||||||
|
|
||||||
|
chain forward_to_svc {
|
||||||
|
}
|
||||||
|
|
||||||
|
chain forward_to_adm {
|
||||||
|
log prefix "fwd-to-adm" group 0
|
||||||
|
|
||||||
|
# Seules les machines du réseau d'administration peuvent accéder au
|
||||||
|
# réseau d'administration
|
||||||
|
ip saddr != $adm_v4 drop
|
||||||
|
ip6 saddr != $adm_v6 drop
|
||||||
|
|
||||||
|
# Les bastions ont accès à toute l'administration
|
||||||
|
ip saddr $bastions_v4 accept
|
||||||
|
ip6 saddr $bastions_v6 accept
|
||||||
|
|
||||||
|
# Tous les serveurs ont accès au collecteur de logs
|
||||||
|
ip daddr $syslog_adm_v4 tcp dport 20514 accept
|
||||||
|
ip daddr $syslog_adm_v4 udp dport 514 accept
|
||||||
|
ip6 daddr $syslog_adm_v6 tcp dport 20514 accept
|
||||||
|
ip6 daddr $syslog_adm_v6 udp dport 514 accept
|
||||||
|
|
||||||
|
# ntp + apt + dns
|
||||||
|
}
|
||||||
|
|
||||||
|
chain forward_to_inet {
|
||||||
|
log prefix "fwd-to-inet" group 0
|
||||||
|
|
||||||
|
# On évite certains problèmes de spam
|
||||||
|
ip saddr $members_v4 tcp dport 25 drop
|
||||||
|
ip6 saddr $members_v6 tcp dport 25 drop
|
||||||
|
|
||||||
|
# Les adhérents ont accès à internet
|
||||||
|
ip saddr $members_v4 accept
|
||||||
|
ip6 saddr $members_v6 accept
|
||||||
|
|
||||||
|
# Les réseaus d'inscription ont accès à internet
|
||||||
|
ip saddr $signup_v4 accept
|
||||||
|
ip6 saddr $signup_v6 accept
|
||||||
|
|
||||||
|
# Les réseaux de services ont accès à Internet
|
||||||
|
ip saddr $svc_v4 accept
|
||||||
|
ip6 saddr $svc_v6 accept
|
||||||
|
}
|
||||||
|
|
||||||
|
# Remarque : on utilise 'drop' et pas 'reject' pour conntrackd
|
||||||
|
chain forward {
|
||||||
|
type filter hook forward priority 0
|
||||||
|
policy drop
|
||||||
|
|
||||||
|
iif lo accept
|
||||||
|
|
||||||
|
jump conntrack
|
||||||
|
|
||||||
|
# http://lists.netfilter.org/pipermail/netfilter-buglog/2017-August/003868.html
|
||||||
|
#ip daddr vmap {
|
||||||
|
# $interco_v4 : goto forward_to_interco,
|
||||||
|
# $members_v4 : goto forward_to_members,
|
||||||
|
# $svc_v4 : goto forward_to_svc,
|
||||||
|
# $adm_v4 : goto forward_to_adm,
|
||||||
|
#}
|
||||||
|
|
||||||
|
ip daddr $interco_v4 goto forward_to_interco
|
||||||
|
ip6 daddr $interco_v6 goto forward_to_interco
|
||||||
|
|
||||||
|
ip daddr $members_v4 goto forward_to_members
|
||||||
|
ip6 daddr $members_v6 goto forward_to_members
|
||||||
|
|
||||||
|
ip daddr $signup_v4 goto forward_to_signup
|
||||||
|
ip6 daddr $signup_v6 goto forward_to_signup
|
||||||
|
|
||||||
|
ip daddr $svc_v4 goto forward_to_svc
|
||||||
|
ip6 daddr $svc_v6 goto forward_to_svc
|
||||||
|
|
||||||
|
ip daddr $adm_v4 goto forward_to_adm
|
||||||
|
ip6 daddr $adm_v6 goto forward_to_adm
|
||||||
|
|
||||||
|
goto forward_to_inet
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
24
roles/nftables_router/templates/nftables.d/60-nat.conf.j2
Normal file
24
roles/nftables_router/templates/nftables.d/60-nat.conf.j2
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
table ip nat {
|
||||||
|
|
||||||
|
chain prerouting {
|
||||||
|
type nat hook prerouting priority -100
|
||||||
|
policy accept
|
||||||
|
}
|
||||||
|
|
||||||
|
chain snat_to_wan {
|
||||||
|
log prefix "snat-to-wan" group 0
|
||||||
|
|
||||||
|
ip saddr $members_v4 snat $members_nat_v4 persistent
|
||||||
|
snat $any_nat_v4 persistent
|
||||||
|
}
|
||||||
|
|
||||||
|
chain postrouting {
|
||||||
|
type nat hook postrouting priority 100
|
||||||
|
policy accept
|
||||||
|
|
||||||
|
oifname $wan_iface goto snat_to_wan
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
15
roles/wireguard_endpoint/handlers/main.yml
Normal file
15
roles/wireguard_endpoint/handlers/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
---
|
||||||
|
- name: Reload network interfaces
|
||||||
|
become: true
|
||||||
|
command: /sbin/ifreload -a
|
||||||
|
|
||||||
|
- name: Reload sysctl
|
||||||
|
become: true
|
||||||
|
command: /sbin/sysctl --system
|
||||||
|
|
||||||
|
- name: Reload nftables
|
||||||
|
become: true
|
||||||
|
systemd:
|
||||||
|
name: nftables.service
|
||||||
|
state: reloaded
|
||||||
|
...
|
50
roles/wireguard_endpoint/tasks/main.yml
Normal file
50
roles/wireguard_endpoint/tasks/main.yml
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
---
|
||||||
|
- name: Install required packages
|
||||||
|
become: true
|
||||||
|
apt:
|
||||||
|
pkg:
|
||||||
|
- ifupdown2
|
||||||
|
- wireguard
|
||||||
|
state: latest
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Tweak sysctl to enable IP forwarding
|
||||||
|
become: true
|
||||||
|
template:
|
||||||
|
src: sysctl.conf.j2
|
||||||
|
dest: /etc/sysctl.d/forwarding.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: u=rw,g=r,o=
|
||||||
|
notify:
|
||||||
|
- Reload sysctl
|
||||||
|
|
||||||
|
- name: Create tunnels configurations
|
||||||
|
become: true
|
||||||
|
template:
|
||||||
|
src: wireguard.conf.j2
|
||||||
|
dest: "/etc/wireguard/{{ item.name }}.conf"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: u=rw,g=,o=
|
||||||
|
loop: "{{ wireguard_endpoints }}"
|
||||||
|
# try to hide clear-text private keys from Ansible output
|
||||||
|
no_log: True
|
||||||
|
diff: no
|
||||||
|
notify:
|
||||||
|
- Reload network interfaces
|
||||||
|
|
||||||
|
- name: Create network interfaces
|
||||||
|
become: true
|
||||||
|
template:
|
||||||
|
src: interface.j2
|
||||||
|
dest: "/etc/network/interfaces.d/{{ item.name }}"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: u=rw,g=r,o=
|
||||||
|
loop: "{{ wireguard_endpoints }}"
|
||||||
|
no_log: True
|
||||||
|
diff: no
|
||||||
|
notify:
|
||||||
|
- Reload network interfaces
|
||||||
|
...
|
7
roles/wireguard_endpoint/templates/interface.j2
Normal file
7
roles/wireguard_endpoint/templates/interface.j2
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
auto {{ item.name }}
|
||||||
|
iface {{ item.name }}
|
||||||
|
link-type wireguard
|
||||||
|
pre-up wg setconf $IFACE /etc/wireguard/$IFACE.conf
|
||||||
|
address {{ item.addr }}
|
4
roles/wireguard_endpoint/templates/sysctl.conf.j2
Normal file
4
roles/wireguard_endpoint/templates/sysctl.conf.j2
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
net.ipv4.ip_forward=1
|
||||||
|
net.ipv6.conf.all.forwarding=1
|
15
roles/wireguard_endpoint/templates/wireguard.conf.j2
Normal file
15
roles/wireguard_endpoint/templates/wireguard.conf.j2
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{{ ansible_managed | comment }}
|
||||||
|
|
||||||
|
[Interface]
|
||||||
|
PrivateKey = {{ item.private_key }}
|
||||||
|
{% if 'listen_port' in item %}
|
||||||
|
ListenPort = {{ item.listen_port }}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
[Peer]
|
||||||
|
PublicKey = {{ item.peer.public_key }}
|
||||||
|
AllowedIps = {{ item.peer.allowed_addrs | join(", ") }}
|
||||||
|
PersistentKeepalive = {{ item.peer.keepalive }}
|
||||||
|
{% if 'endpoint' in item.peer %}
|
||||||
|
Endpoint = {{ item.peer.endpoint }}
|
||||||
|
{% endif %}
|
10
vpn.yml
Executable file
10
vpn.yml
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/env ansible-playbook
|
||||||
|
---
|
||||||
|
- hosts:
|
||||||
|
- vpn-ovh-ng.auro.re
|
||||||
|
- vpn-ng.adm.auro.re
|
||||||
|
- vpn-ng-backup.adm.auro.re
|
||||||
|
roles:
|
||||||
|
- wireguard_endpoint
|
||||||
|
- bird
|
||||||
|
...
|
Loading…
Reference in a new issue