Alguém pode me dar uma luz?
Estou tentando utilizar o gnome-lokkit para criar um firewall básico. Mas parece que não surte efeito...
Vou deixar aqui a configuração do iptables para análise.
Inicialmente estava assim:
ubuntu@ubuntu-laptop:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Depois de rodar o comando gnome-lokkit (e colocando baixa segurança), ficou assim:
ubuntu@ubuntu-laptop:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Lokkit-0-50-INPUT (0 references)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT udp -- anywhere anywhere udp spts:bootps:bootpc dpts:bootps:bootpc
ACCEPT all -- anywhere anywhere
REJECT tcp -- anywhere anywhere tcp dpts:0:1023 flags:FIN,SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:nfs flags:FIN,SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpts:0:1023 reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpt:nfs reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpts:x11:6009 flags:FIN,SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:font-service flags:FIN,SYN,RST,ACK/SYN reject-with icmp-port-unreachable
Como faço pra saber se a configuração acima está funcionando???
Tentei configurar para alta segurança para ver se bloqueava o DHCP e o aMSN (apenas para testar) e não surtiu efeito...
Para alta segurança fica assim (sem efeito aparente):
ubuntu@ubuntu-laptop:~$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Lokkit-0-50-INPUT (0 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT udp -- 10.1.1.1 anywhere udp spt:domain
REJECT tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp reject-with icmp-port-unreachable
Se utilizo o seguinte comando o iptables bloqueia tudo (o que indica que está ativo):
iptables -F && iptables -X && iptables -F -t nat && iptables -X -t nat && iptables -F -t mangle && iptables -X -t mangle && iptables -t filter -P INPUT DROP && iptables -t filter -P OUTPUT DROP && iptables -t filter -P FORWARD DROP
Estou usando este comando para voltar o iptables para o estado original, desbloqueando tudo:
iptables -F && iptables -X && iptables -F -t nat && iptables -X -t nat && iptables -F -t mangle && iptables -X -t mangle && iptables -t filter -P INPUT ACCEPT && iptables -t filter -P OUTPUT ACCEPT && iptables -t filter -P FORWARD ACCEPT
Como faço para que as configurações geradas pelo gnome-lokkit tenham efeito???