one. The port number that the service opens. DHCPSamba 139 445http HTTPS 443MySQL 3306 MSSQL 1433 Oracle 1521SSHtelnetDNStwo. iptables Firewall Open Firewall command: SetupIptables Firewall protection rules and functions: Acting on the network layerLinux Packet filtering firewall overviewnetfilter packet filtering system in the Linux kernel, called the kernel state of the Linux firewallIptables is located in/sbin/iptables, a tool used to manage firewall rules, called the Linux firewall User Configuration both of these names can represent the Linux firewallfour grid table: four functionsRaw: Traffic tracking (Enterprise Router pie chart) mangle; Traffic Shaping (Enterprise-class router network telephony)NAT: Network address translation (the server acts as a gateway router when the inbound outbound visit is in use)Filter: Packet filtering (information of the original destination address information for rule writing to protect the server itself) Five chain chain: Where to write rulesFilter:input Inbound chain ouput outbound chain Foreard forwarding chainp: Specify the rule, TCP (three-time handshake) UDP (Fast unsecured) ICMP (ping, see if it survives)watch-n1 IPTABLES-NVL--Line-numberAvsftp Service BuildingSMB file system shared in LAN ftp file sharing within the InternetYum Install vsftpd/etc/init.d/vsftpd Start/var/ftp Directory default shared directory Graphics folder Browserftp:/192.168.1.223 cmd FTP tool linked serverftp:/192.168.1.223
User name: FTP
Password: EnterGet File If the firewall is turned on by default, all ports are denied how to enable the transfer of the FTP serviceiptables-p INPUT drop| ACCEPT sets the default policy for the input chainActive Mode:iptables-i input-p tcp--dport 20:21-j ACCEPTPassive mode random ports need to know (set) the range of open vim/etc/vsftpd/vsftp.confpasv_max_port=1500 Open the random maximum port numberpasv_min_port=1000 Opening the minimum port numbermatch condition: generic match implied match display matchiptables-f empty source ruleIPTABLES-NL Viewing rulesiptables-p Default Rulesiptables-d Delete a rule iptables-i Insert (start) iptables-a Append (end)iptables-i input-p tcp-m multiport--dport 20,21,1000:1500-j ACCEPTFirewall Rule Protection iptables-save > file path Current-period rule save asIptables-restore < Files replace the file contents with the current ruleDefault rule file/etc/sysconfig/iptables/etc/init.d/iptables Save current rule as default configuration ruleWindowscmd:ftp 172.16.111.110! Invoke cmd commandCD switch Local directoryGet download fileput upload file
15.linux iptables firewall Rules vsftp Service