
 
		
		
    
-  Fechando tudo!!
 
	
	
 
 
 
		
			
	+ Responder ao Tópico
	
	
	
	
	
	
		
			
- 
	
	
		
		
			
				
				
				
					
 Fechando tudo!!
				
				
						
							
							
						
						
				
					
						
							Olá pessoal......
Desculpem fazer uma pergunta tão banal, mas ainda sou munheca em IPTABLES e preciso disso urgente:
"Preciso de uma regra que feche TUDO no servidor Linux (CL<IMG SRC="images/forum/icons/icon_cool.gif"> e deixe aberto somente a porta 80 (apache) e 21 (FTP)". Esta máquina é um servidor WEB e alguns usuários fazem FTP tb.
De antemão, obrigado!!
AllX
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
- 
	
	
		
		
			
				
				
				
					
 Fechando tudo!!
				
				
						
						
							
						
				
					
						
							
#Limpar as regras
iptables -F 
iptables -X
#Bloquear tudo
iptables -t filter -P INPUT DROP
iptables -t filter -P FORWARD DROP
iptables -t filter -P OUTPUT ACCEPT
#Liberar FTP 
iptables -t filter -A INPUT -p tcp -s 0/0 --dport 21 -j ACCEPT
iptables -t filter -A INPUT -p tcp -s 0/0 --dport 20 -j ACCEPT
#Liberar internet
iptables -t filter -A INPUT -p tcp -s 0/0 --dport 80 -j ACCEPT
Esperto ter ajudado.