Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Ubuntu achieve initialization iptables     - Linux5 install MySQL 5.6 (RPM mode) (Database)

- Linux Mint 17.2 64 bit installation Docker and management software seagull (Linux)

- Vim useful plugin: vundle (Linux)

- C ++ hash function (Programming)

- Analysis JavaBean (Programming)

- cp: omitting directory error solutions under Linux (Linux)

- How to ensure that the Internet will not be attacked (Linux)

- Binary Tree Traversal (Linux)

- JavaScript cross-browser event object library (Programming)

- Linux disk partition batch format mount script (Linux)

- Linux ./configure --prefix command (Linux)

- Ubuntu 14.04 Boot Repair (Linux)

- PostgreSQL with the C Completing the storage process instances (Database)

- Boost notes --Asio - (1) a simple small example of synchronous communication (Programming)

- Nginx log cutting and MySQL script regular backup script (Server)

- Shell for loop (Programming)

- ActiveMQ memory settings and flow control (Linux)

- MySQL restart process can not be taken lightly (Database)

- Use SVN to automatically deploy code under Apache (Server)

- Using PHP MySQL library (Programming)

 
         
  Ubuntu achieve initialization iptables
     
  Add Date : 2018-11-21      
         
         
         
  Brief Description: Ubuntu iptables script there is no ready-made series like RedHat inside, so you need to manually write. So get yourself a bar. The following provides a. Secondly, for sys V these things need to install software to control accessory

system. Such as: rcconf, add the script to the /etc/init.d can run automatically.

Brief script as follows:


#! / Bin / bash
case "$ 1" in
start)
       echo -n "Staring to write your Iptbales: ..."
       / Sbin / iptables -P INPUT DROP
       / Sbin / iptables -P OUTPUT ACCEPT
       / Sbin / iptables -A INPUT -i lo -j ACCEPT
       / Sbin / iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j DROP
       / Sbin / iptables -A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
       / Sbin / iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
       / Sbin / iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
       / Sbin / iptables -A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
       / Sbin / iptables -A INPUT -p all -m state --state ESTABLISHED, RELATED -j ACCEPT
       / Sbin / iptables -A INPUT -p all -m state --state INVALID, NEW -j DROP
       echo "Ok"

;;
stop)
       echo -n "Cleaning your Iptables: ..."
       / Sbin / iptables -F
       / Sbin / iptables -X
       / Sbin / iptables -Z
       echo "Ok"
;;
restart)
       echo -n "Cleaning your Iptables: ..."
       / Sbin / iptables -F
       / Sbin / iptables -X
       / Sbin / iptables -Z
       echo "Ok"
       echo -n "Staring to write your Iptbales: ..."
       / Sbin / iptables -P INPUT DROP
       / Sbin / iptables -P OUTPUT ACCEPT
       / Sbin / iptables -A INPUT -i lo -j ACCEPT
       / Sbin / iptables -A INPUT -p icmp -m icmp --icmp-type 8 -j DROP
       / Sbin / iptables -A INPUT -p tcp -m tcp --dport 20 -j ACCEPT
       / Sbin / iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
       / Sbin / iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
       / Sbin / iptables -A INPUT -p tcp -m tcp --dport 3306 -j ACCEPT
       / Sbin / iptables -A INPUT -p all -m state --state ESTABLISHED, RELATED -j ACCEPT
       / Sbin / iptables -A INPUT -p all -m state --state INVALID, NEW -j DROP
       echo "Ok"
;;
*)
       echo "Usage: $ 0 {start | stop | restart}"
esac

exit 0

Added to other start level

apt-get install rcconf
     
         
         
         
  More:      
 
- MySQL monitoring tool -Innotop (Database)
- Linux system security configuration (Linux)
- Using Linux / Unix Text processing (Linux)
- Java objects are taking up much space (Programming)
- RedHat Linux 6.4 install Oracle 10g error (Database)
- Depth understanding of C language (Programming)
- Linux virtual machines to solve end MySQL database can not remote access (Database)
- IP configuration under Linux (Linux)
- The security administrator network analysis tools SATAN Introduction under Linux (Linux)
- Linux permissions Detailed (Linux)
- Disk storage structure and file recovery experiment (FAT file system) (Linux)
- Python image processing library (PIL) to install and simple to use (Linux)
- How to clear the v $ archived_log view expiration information (Database)
- DB2 commonly used scripting sort out (Database)
- Swift rewrite initialize method of navigation controller class (Programming)
- Binary Packages Golang (Linux)
- To set up the printer use Nagios Monitoring Server (Server)
- How to fix Ubuntu / Mint can not add PPA source of error (Linux)
- Hands to teach you to solve Ubuntu error message (Linux)
- NIC configuration parameters under Linux (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.