Last active
          February 10, 2016 17:00 
        
      - 
      
 - 
        
Save fedir/ed3d729340425b045407 to your computer and use it in GitHub Desktop.  
    iptables modification with backup
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Backup | |
| iptables-save > my-iptables | |
| # Forbid access by an IP | |
| iptables -A INPUT -p tcp --dport 8000 -s 1.2.3.4 -j ACCEPT | |
| iptables -A INPUT -p tcp --dport 8000 -j DROP | |
| # Optional restore OR manual modification apply | |
| #iptables-restore < my-iptables | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment