Compare commits

...

2 Commits

Author SHA1 Message Date
Johan Largy
2546430f94 Merge branch 'main' of https://gitea.lyc-lecastel.fr/gadmin/gsb2023 2023-04-03 11:05:13 +02:00
Johan Largy
0624f3da72 modification 2023-04-03 11:04:13 +02:00
3 changed files with 3 additions and 58 deletions

View File

@ -18,7 +18,7 @@
# - firewall-vpn-l # - firewall-vpn-l
- wireguard-l - wireguard-l
# - x509-l # - x509-l
- fw-ferm - post
- ssh-cli - ssh-cli
- syslog-cli - syslog-cli
- post - fw-ferm

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

@ -50,15 +50,7 @@ table filter {
chain FORWARD { chain FORWARD {
policy ACCEPT; policy ACCEPT;
interface $DEV_VPN{
# respond to ping
proto icmp icmp-type echo-request ACCEPT; 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;
} }
# connection tracking # connection tracking
mod state state INVALID DROP; mod state state INVALID DROP;