Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add opt-in configuration for incoming Related connections through 'gateway_allow_incoming_related_state' #3

Merged
merged 1 commit into from
May 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions usr/bin/whonix-gateway-firewall
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,14 @@ ipv4_input_rules() {
## Traffic on the loopback interface is accepted.
$iptables_cmd -A INPUT -i lo -j ACCEPT

## Established incoming connections are accepted.
$iptables_cmd -A INPUT -m state --state ESTABLISHED -j ACCEPT
## Established incoming connections are always accepted.
## Optionally, allow Related incoming connections when
## GATEWAY_ALLOW_INCOMING_RELATED_STATE mode is enabled.
if [ "$GATEWAY_ALLOW_INCOMING_RELATED_STATE" = "1" ]; then
$iptables_cmd -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
else
$iptables_cmd -A INPUT -m state --state ESTABLISHED -j ACCEPT
fi

## Drop all incoming ICMP traffic by default.
## All incoming connections are dropped by default anyway, but should a user
Expand Down