First commit
This commit is contained in:
		
							
								
								
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.gitignore
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| Makefile.conf | ||||
| tmp/ | ||||
| keys/ | ||||
| configs/ | ||||
							
								
								
									
										27
									
								
								Makefile.conf.sample
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								Makefile.conf.sample
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| ##### PARAMS | ||||
|  | ||||
| nets = myfirstnet | ||||
|  | ||||
| net_myfirstnet_domain = net.private | ||||
| net_myfirstnet_hosts  = privatehost1 privatehost2 | ||||
|  | ||||
| net_myfirstnet_privatehost1_public_address = privatehost1.private.lan | ||||
| net_myfirstnet_privatehost1_local_address = 192.168.100.1/24 | ||||
| net_myfirstnet_privatehost1_local_subnets = 192.168.100.0/24 192.168.10.0/24 192.168.20.0/24 | ||||
|  | ||||
| net_myfirstnet_privatehost2_local_address = 192.168.101.1/24 | ||||
| net_myfirstnet_privatehost2_local_subnets = 192.168.101.0/24 | ||||
|  | ||||
| nets += mysecondnet | ||||
|  | ||||
| net_mysecondnet_domain = mysecondnet.public | ||||
| net_mysecondnet_hosts  = host1 host2 | ||||
|  | ||||
| net_mysecondnet_host1_public_address = host1.somedomain.com | ||||
| net_mysecondnet_host1_public_port = 656 | ||||
| net_mysecondnet_host1_local_address = 192.168.200.2/24 | ||||
| net_mysecondnet_host1_local_subnets = 192.168.200.0/24 | ||||
|  | ||||
| net_mysecondnet_host2_public_address = host2.otherdomain.com | ||||
| net_mysecondnet_host2_local_address = 192.168.201.1/24 | ||||
| net_mysecondnet_host2_local_subnets = 192.168.201.0/24 192.168.111.0/24 192.168.112.0/24 | ||||
							
								
								
									
										12
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								README.md
									
									
									
									
									
								
							| @@ -1,3 +1,11 @@ | ||||
| # tinc | ||||
| # Script de génération de configuration pour le VPN tinc | ||||
|  | ||||
| Ce dépot contient un Makefile permettant de simplifier la génération des confs pour le VPN [tinc](https://tinc-vpn.org) | ||||
|  | ||||
| ## Génération des confs | ||||
|  | ||||
| 1. Faites une copie du fichier Makefile.conf.sample nomée Makefile.conf. | ||||
| 2. Editez ce dernier avec vos préférences. | ||||
| 3. Lancez la génération des confs avec la commande ```make``` | ||||
| 4. Copiez les configurations générées vers les hôtes respectifs. | ||||
|  | ||||
| Scripts pour générer des confs pour [tinc](https://tinc-vpn.org) | ||||
							
								
								
									
										6
									
								
								scripts/subnet-down
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								scripts/subnet-down
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| if [ "$NODE" != "$HOSTNAME" ] | ||||
| then | ||||
|   ip route delete $SUBNET dev $INTERFACE | ||||
| fi | ||||
							
								
								
									
										6
									
								
								scripts/subnet-up
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										6
									
								
								scripts/subnet-up
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| if [ "$NODE" != "$NAME" ] | ||||
| then | ||||
|   ip route add $SUBNET dev $INTERFACE | ||||
| fi | ||||
							
								
								
									
										3
									
								
								scripts/tinc-down
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										3
									
								
								scripts/tinc-down
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,3 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| ip link set $INTERFACE down | ||||
							
								
								
									
										7
									
								
								scripts/tinc-up
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										7
									
								
								scripts/tinc-up
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| ADDRESS= | ||||
|  | ||||
| ip address add $ADDRESS dev $INTERFACE | ||||
| ip link set $INTERFACE up | ||||
|  | ||||
		Reference in New Issue
	
	Block a user