Compare commits
2 Commits
v0.0.3n-em
...
v0.0.3p-ml
Author | SHA1 | Date | |
---|---|---|---|
143c3878a3 | |||
76b4ceabe3 |
12
goss/list-goss
Normal file
12
goss/list-goss
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
cd goss/
|
||||||
|
goss -g r-vp1.yaml v
|
||||||
|
goss -g r-vp1.yaml aa wireguard
|
||||||
|
goss add interface enp0s3
|
||||||
|
goss add interface enp0s8
|
||||||
|
goss add interface enp0s9
|
||||||
|
goss add interface wg0
|
||||||
|
goss aa wireguard
|
||||||
|
goss add package wireguard-tools
|
||||||
|
goss add service wg-quick@wg0
|
||||||
|
goss add command "ping -c4 10.0.0.2"
|
||||||
|
goss add file "/etc/wireguard/wg0.conf"
|
63
roles/fw-ferm-1/ferm.conf
Normal file
63
roles/fw-ferm-1/ferm.conf
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
# -*- shell-script -*-
|
||||||
|
#
|
||||||
|
# Ferm script r-vp1
|
||||||
|
|
||||||
|
@def $DEV_PRIVATE = enp0s8;
|
||||||
|
@def $DEV_WORLD = enp0s9;
|
||||||
|
|
||||||
|
@def $NET_PRIVATE = 172.16.0.0/24;
|
||||||
|
|
||||||
|
table filter {
|
||||||
|
chain (INPUT OUTPUT){
|
||||||
|
# allow VPN
|
||||||
|
proto udp dport 51820 ACCEPT;
|
||||||
|
}
|
||||||
|
chain INPUT {
|
||||||
|
policy DROP;
|
||||||
|
|
||||||
|
# connection tracking
|
||||||
|
mod state state INVALID DROP;
|
||||||
|
mod state state (ESTABLISHED RELATED) ACCEPT;
|
||||||
|
|
||||||
|
# allow local connections
|
||||||
|
interface lo ACCEPT;
|
||||||
|
|
||||||
|
# respond to ping
|
||||||
|
proto icmp icmp-type echo-request ACCEPT;
|
||||||
|
|
||||||
|
|
||||||
|
# allow SSH connections from the private network and from some
|
||||||
|
# well-known internet hosts
|
||||||
|
saddr ($NET_PRIVATE 81.209.165.42) proto tcp dport ssh ACCEPT;
|
||||||
|
|
||||||
|
# we provide DNS and SMTP services for the internal net
|
||||||
|
interface $DEV_PRIVATE saddr $NET_PRIVATE {
|
||||||
|
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 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_PRIVATE ACCEPT;
|
||||||
|
|
||||||
|
# the rest is dropped by the above policy
|
||||||
|
}
|
||||||
|
}
|
12
roles/fw-ferm-1/nmap-rvp1.txt
Normal file
12
roles/fw-ferm-1/nmap-rvp1.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
# CMD
|
||||||
|
sudo nmap -pU:51820 192.168.0.51
|
||||||
|
#Resultat
|
||||||
|
Starting Nmap 7.80 ( https://nmap.org ) at 2023-01-27 09:02 CET
|
||||||
|
Nmap scan report for 192.168.0.51
|
||||||
|
Host is up (0.00030s latency).
|
||||||
|
|
||||||
|
PORT STATE SERVICE
|
||||||
|
51820/tcp filtered unknown
|
||||||
|
MAC Address: 08:00:27:F0:E2:46 (Oracle VirtualBox virtual NIC)
|
||||||
|
|
||||||
|
Nmap done: 1 IP address (1 host up) scanned in 0.36 seconds
|
Reference in New Issue
Block a user