Skip to content
This repository has been archived by the owner on Dec 10, 2022. It is now read-only.

Add iptable rules into README to help users #60

Open
kpp opened this issue May 19, 2019 · 4 comments
Open

Add iptable rules into README to help users #60

kpp opened this issue May 19, 2019 · 4 comments

Comments

@kpp
Copy link
Member

kpp commented May 19, 2019

iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 33445 -j ACCEPT
iptables -A INPUT -p udp --dport 33445 -j ACCEPT
iptables -A OUTPUT -p tcp --dport 33445 -j ACCEPT
iptables -A OUTPUT -p udp --sport 33445 -j ACCEPT
iptables -A OUTPUT -p udp --dport 33445 -j ACCEPT

As a known issue to #56

@kurnevsky
Copy link
Member

-m state --state NEW -m tcp

It makes sense only if we allow related and established states somewhere else.

iptables -A OUTPUT -p udp --dport 33445 -j ACCEPT

This line is unnecessary since we allow all connections from the port 33445 above.

iptables -A OUTPUT -p tcp --dport 33445 -j ACCEPT

It seems we should use sport here? Because we want to allow all TCP packets from our node that listens 33445 port.

I'd change it to:

-A INPUT -p tcp --dport 33445 -j ACCEPT
-A INPUT -p udp --dport 33445 -j ACCEPT
-A OUTPUT -p tcp --sport 33445 -j ACCEPT
-A OUTPUT -p udp --sport 33445 -j ACCEPT

Here are rules I use (also with bandwidth limit):
https://github.com/kurnevsky/server/blob/master/roles/iptables/files/iptables.rules

@kurnevsky
Copy link
Member

kurnevsky commented May 19, 2019

Also these rules should be applied for both for IPv4 and IPv6 via iptables and ip6tables.

@T-Shilov
Copy link

T-Shilov commented Feb 24, 2020

Here are rules I use (also with bandwidth limit):
https://github.com/kurnevsky/server/blob/master/roles/iptables/files/iptables.rules

  • this link not worked

@kpp
Copy link
Member Author

kpp commented Feb 26, 2020

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

No branches or pull requests

3 participants