Compare commits

..

21 Commits

Author SHA1 Message Date
c446f35aed changement 2023-04-04 10:25:52 +02:00
41bd6ac61e feat: changed the way peertube role is handled 2023-04-04 10:24:41 +02:00
7ce68f6293 fix: misleading docs by redhat ;p 2023-04-04 09:38:16 +02:00
bac2f067a9 fix: sychronized roles for peertube 2023-04-04 09:27:12 +02:00
d6d4991c16 fix: edited postfix configuration 2023-04-04 09:20:33 +02:00
2f7544c3a1 fix: changed order of task in main.yaml 2023-04-04 09:01:02 +02:00
c83ba7c977 fix: changed the way peertube is installed for better comprehension 2023-04-04 08:56:47 +02:00
1532c8bdd0 Merge branch 'main' of https://gitea.lyc-lecastel.fr/gadmin/gsb2023 2023-04-04 08:42:51 +02:00
08c73d0416 fix: cluster reacheable during install process 2023-04-04 08:41:40 +02:00
083b112d03 push ferm.conf 2023-04-04 08:41:20 +02:00
252618618b fix: mispelling in main.yaml for peertube 2023-04-04 08:33:55 +02:00
34f3adb117 feat: peertube role changes resolv.conf 2023-04-04 08:24:52 +02:00
3565d85543 fix: fixed l3s cluster being unreacheable 2023-04-04 08:13:55 +02:00
de757a6b55 fix: changed default playbook for peertube 2023-04-03 11:53:43 +02:00
e38f8c6da5 fix: mispelling in peertube mail.yaml 2023-04-03 11:45:47 +02:00
40eadcc37a fix: needed helm repos to use peertube 2023-04-03 11:24:36 +02:00
68c05b0794 correction port 2023-04-03 11:22:58 +02:00
b36505bf78 fix: needed to add repos with helm 2023-04-03 11:08:53 +02:00
2546430f94 Merge branch 'main' of https://gitea.lyc-lecastel.fr/gadmin/gsb2023 2023-04-03 11:05:13 +02:00
0624f3da72 modification 2023-04-03 11:04:13 +02:00
40c8aeccd9 fix: changed paths in peertube role 2023-04-03 11:00:19 +02:00
19 changed files with 57 additions and 168 deletions

View File

@ -53,7 +53,7 @@ On utilsera le script (bash) **mkvm** ou (PowerShell) **mkvm.ps1** pour créeer
```shell
gsb2023>
cd pre
cd scripts
$ mkvm -r s-adm
```

13
r-vp1-fw.yml Normal file
View File

@ -0,0 +1,13 @@
---
- hosts: localhost
connection: local
vars:
- ip1: 192.168.0.51
- remip: 192.168.0.52
- mynet: 192.168.1.0
- remnet: 172.16.128.0
roles:
- fw-ferm

View File

@ -12,10 +12,8 @@
- base
- goss
# - snmp-agent
# - firewall-vpn-r
- post
- wireguard-r
- fw-ferm
- ssh-cli
- syslog-cli

View File

@ -15,10 +15,7 @@
- dns-agence
- ssh-root-access
# - snmp-agent
# - firewall-vpn-l
- wireguard-l
# - x509-l
- fw-ferm
- post
- ssh-cli
- syslog-cli
- post

View File

@ -1,23 +0,0 @@
// 0.2 - putconf - vendredi 12 avril 2013, 08:54:33 (UTC+0200)
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
forwarders {
172.16.0.1;
};
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};

View File

@ -1,4 +0,0 @@
---
- name: restart bind9
service: name=bind9 state=restarted

View File

@ -1,11 +0,0 @@
---
- name: Installation bind9
apt: name=bind9 state=present update_cache=yes
- name: Copie named.conf.options
copy: src=named.conf.options dest=/etc/bind
notify:
- restart bind9

View File

@ -1,47 +0,0 @@
# -*- shell-script -*-
@def $DEV_VPN= wg0;
table filter {
chain INPUT {
policy DROP;
# connection tracking
mod state state INVALID DROP;
mod state state (ESTABLISHED RELATED) ACCEPT;
# allow local connections
interface lo ACCEPT;
interface $DEV_VPN{
# respond to ping
proto icmp icmp-type echo-request ACCEPT;
# disallow ssh
saddr proto tcp dport ssh DROP;
}
}#FIN INPUT
# outgoing connections are not limited
chain OUTPUT {
policy ACCEPT;
interface $DEV_VPN{
# allow ssh
daddr proto tcp dport ssh ACCEPT;
# respond to ping
proto icmp icmp-type echo-request ACCEPT;
}
}#FIN OUTPUT
chain FORWARD {
policy ACCEPT;
# connection tracking
mod state state INVALID DROP;
mod state state (ESTABLISHED RELATED) ACCEPT;
# connections from the internal net to the internet or to other
# internal nets are allowed
interface $DEV_VPN ACCEPT;
# the rest is dropped by the above policy
}#FIN FO
}

View File

@ -35,31 +35,22 @@ table filter {
proto (udp tcp) dport domain ACCEPT;
proto udp dport bootps ACCEPT;
}
# interface réseau
interface $DEV_WORLD {
}
# the rest is dropped by the above policy
}#FIN INPUT
# outgoing connections are not limited
chain OUTPUT {policy ACCEPT;
chain OUTPUT {
policy ACCEPT;
# interface $DEV_VPN proto ssh dport 22 ACCEPT;
}#FIN OUTPUT
chain FORWARD {
policy ACCEPT;
interface $DEV_VPN{
# respond to ping
proto icmp icmp-type echo-request ACCEPT;
# disallow ssh
saddr($DEV_VPN) proto tcp dport ssh DROP;
# allow ssh
daddr($DEV_VPN) proto tcp dport ssh ACCEPT;
}
proto icmp icmp-type echo-request ACCEPT;
# connection tracking
mod state state INVALID DROP;
mod state state (ESTABLISHED RELATED) ACCEPT;

View File

View File

@ -0,0 +1,23 @@
---
- name: mise a jour de resolv.conf...
copy:
src: /root/tools/ansible/gsb2023/roles/peertube/files/resolv.conf
dest: /etc/
mode: '0644'
- name: installation de docker...
shell: curl https://releases.rancher.com/install-docker/20.10.sh | sh
- name: attente de l'installation...
wait_for:
timeout: 30
host: localhost
- name: installation de k3s...
shell: curl -sfL https://get.k3s.io | sh -s - --docker
- name: mise a jour de resolv.conf...
copy:
src: /root/tools/ansible/gsb2023/roles/peertube/files/resolv.conf
dest: /etc/
mode: '0644'

View File

@ -0,0 +1 @@
nameserver 192.168.99.99

View File

@ -71,7 +71,7 @@ mail:
enbled: true
config:
general:
ALLOWED_SENDER_DOMAINS: # should be the same as your web domain
ALLOWED_SENDER_DOMAINS: "yes"
DKIM_AUTOGENERATE: "yes"
opendkim:
RequireSafeKeys: "no"

View File

@ -1,10 +1,4 @@
---
- name: installation de docker...
shell: curl https://releases.rancher.com/install-docker/20.10.sh | sh
- name: installation de k3s...
shell: curl -sfL https://get.k3s.io | sh -s - --docker
- name: création du répertoire du dépot peertube...
file:
path: /root/tools/peertube
@ -16,6 +10,7 @@
repo: https://github.com/Elam-Monnot/Peertube-helm.git
dest: /root/tools/peertube
clone: yes
force: yes
- name: copie de values.yaml...
copy:
@ -27,4 +22,10 @@
shell: curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
- name: installation de peertube...
shell: helm dependency build /root/tools/peertube/Peertube-helm/helm/ && helm install --create-namesapce -n peertube peertube-gsb
shell: helm repo add postgresql https://charts.bitnami.com/bitnami && helm repo add redis https://charts.bitnami.com/bitnami && helm repo add mail https://bokysan.github.io/docker-postfix
- name: exposition du cluster...
shell: export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
- name: lancement du helm chart peertube...
shell: helm install --create-namespace -n peertube peertube-gsb /root/tools/peertube/helm

View File

@ -1,26 +0,0 @@
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
#auto lo
#iface lo inet loopback
#cote N-adm
allow-hotplug enp0s3
iface enp0s3 inet dhcp
# reseau entre vpn
allow-hotplug enp0s8
iface enp0s8 inet static
address 192.168.0.51
netmask 255.255.255.0
# reseau interne n-linkv
allow-hotplug enp0s9
iface enp0s9 inet static
address 192.168.1.2
netmask 255.255.255.0
up route add -net 172.16.128.0/24 gw 192.168.1.2
up route add default gw 192.168.1.1
# post-up /bin/bash /root/iptables-vpn
post-up /etc/init.d/ipsec restart

View File

@ -1,25 +0,0 @@
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
#auto lo
#iface lo inet loopback
# cote N-adm
allow-hotplug enp0s3
iface enp0s3 inet dhcp
# cote Agence
allow-hotplug enp0s8
iface enp0s8 inet static
address 172.16.128.254
netmask 255.255.255.0
# cote VPN
allow-hotplug enp0s9
iface enp0s9 inet static
address 192.168.0.52
netmask 255.255.255.0
up route add -net 192.168.1.0/24 gw 172.16.128.254
# post-up /bin/bash /root/iptables-vpn
post-up /etc/init.d/ipsec restart

View File

@ -14,4 +14,4 @@ iface enp0s3 inet static
allow-hotplug enp0s8
iface enp0s8 inet static
address 192.168.100.20/24
post-up systemctl start k3s
post-up systemctl start k3s && sleep 20 && export KUBECONFIG=/etc/rancher/k3s/k3s.yaml

View File

@ -4,7 +4,8 @@
roles:
- base
- peertube
- post
- snmp-agent
- ssh-cli
- peertube-k3s
- peertube

View File

@ -1,6 +1,6 @@
#!/bin/bash
#recuperation du fichier de config
wget http://r-vp1.gsb.adm:8800/wg0-b.conf
wget http://r-vp1.gsb.adm:8000/wg0-b.conf
#renomage fichier et mv
mv ./wg0-b.conf /etc/wireguard/wg0.conf
#activation interface wg0