Regras iptables estritas / detalhadas para i2p

3

Acho que entendi o i2p faq corretamente, e isso parece funcionar (adicionei as palavras do faq seguidas pelas regras, em ordem, e alterei meu número de porta exclusivo para PORT):

# Outbound UDP from the random port noted on the configuration page
# to arbitrary remote UDP ports, allowing replies
-A OUTPUT -p udp --sport PORT -j ACCEPT

# Outbound TCP from random high ports to arbitrary remote TCP ports
-A OUTPUT -p tcp --sport 9000:31000 -j ACCEPT

# Inbound UDP to the port noted on configuration page from arbitrary locations
-A INPUT -p udp --dport PORT -j ACCEPT

# Inbound TCP to the port noted on configuration page from arbitrary locations
-A INPUT -p tcp --dport PORT -j ACCEPT

# Outbound UDP on port 123, allowing replies
-A OUTPUT -p udp --sport 123 -j ACCEPT

Mas como eu tenho um usuário i2p e tudo, talvez isso seja melhor?

-A INPUT -j ACCEPT -m owner --uid-owner i2p
-A OUTPUT -j ACCEPT -m owner --uid-owner i2p

O primeiro é mais seguro porque não permite que um usuário passe livremente pelo firewall como ele gosta? Ou o último é mais seguro porque somente as portas usadas pelo usuário estarão abertas a qualquer momento?

Além disso, estou assumindo um estado NOVO, ESTABELECIDO e RELACIONADO em todos, mas talvez alguns devam ser ESTABELECIDOS ou algo assim, como a regra de saída para tcp no intervalo de portas 9000-31000?

    
por Universcilis 26.10.2016 / 01:55

0 respostas