Skip to content

Instantly share code, notes, and snippets.

@atomlab
Created January 28, 2021 17:53
Show Gist options
  • Save atomlab/a65c7eb8dd6281638e56f5f8fd8e632e to your computer and use it in GitHub Desktop.
Save atomlab/a65c7eb8dd6281638e56f5f8fd8e632e to your computer and use it in GitHub Desktop.
Default ferm conf
def $TRUSTED = (
);
domain (ip) {
table filter {
chain INPUT {
policy DROP;
# connection tracking
mod state state INVALID DROP;
mod state state (ESTABLISHED RELATED) ACCEPT;
# allow local packet
interface lo ACCEPT;
# respond to ping
proto icmp ACCEPT;
# allow SSH connections
proto tcp dport ssh ACCEPT;
saddr $TRUSTED proto (tcp udp) ACCEPT;
}
chain OUTPUT {
policy ACCEPT;
# connection tracking
#mod state state INVALID DROP;
mod state state (ESTABLISHED RELATED) ACCEPT;
}
chain FORWARD {
policy DROP;
# connection tracking
mod state state INVALID DROP;
mod state state (ESTABLISHED RELATED) ACCEPT;
}
}
}
@include ferm.d/;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment