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

Redundant iptables rules? #1236

Open
thusoy opened this issue Dec 29, 2015 · 1 comment
Open

Redundant iptables rules? #1236

thusoy opened this issue Dec 29, 2015 · 1 comment

Comments

@thusoy
Copy link

thusoy commented Dec 29, 2015

Looking over the iptables ruleset it seems that this rule on line 24:
-A INPUT -p tcp -m state --state ESTABLISHED,RELATED -j ACCEPT -m comment --comment "Allow traffic back for tor"
shadows the later rules on line 66 and line 89:

-A INPUT -p tcp --match multiport --sports 80,8080,443 -m state --state ESTABLISHED,RELATED -j ACCEPT -m comment --comment "apt updates"
-A INPUT -p tcp --sport {{ smtp_relay_port }} -m state --state ESTABLISHED,RELATED -j ACCEPT -m comment --comment "Allow ossec email alerts out"

I haven't configured a local install for testing, but I would guess that the latter rules are never hit?

@ghost ghost added bug security labels Dec 7, 2017
@singuliere
Copy link
Contributor

I confirm that running a staging app server and removing iptables -D INPUT -p tcp -m multiport --sports 80,8080,443 -m state --state RELATED,ESTABLISHED -m comment --comment "apt updates" -j ACCEPT does not inpact apt-get update. It shadows all --state ESTABLISHED,RELATED INPUT rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants