After CentOS is installed, only port 22 is enabled by default. if you want to open other ports, you need to open the required ports. For example, open the default port 80 for http edit iptablesvi/etc/sysconfig/iptables
Server configurations mainly include system initialization (disabling unnecessary services), Software Compilation and installation environment (make, cmake, and connection tools), and application installation (PHP, MySQL, and so on. If the purchased
When the server does not run php or install phpmyadmin, it is necessary to remotely manage mysql. Because it is set under CentOS, the title is added with CentOS. the following commands should also be OK in debian and other systems.
Port 80 must be enabled, and the IP address and the following three lines in the Lan must be specified: first close all port 80 enable ip segment 192.168.1.0/24 end 80 enable ip segment 211.123.16.123/24 end ip segment 80 Port # iptables-IINPUT-ptcp
# Open DNS on this host and external DNS host interaction queries: use udpiptables-AOUTPUT-oeth0-pudp-s $ FW_IP -- sport53-dany/0 -- dport53-jACCEPTiptables-AINPUT-ieth0-pudp-sany/0 -- sport53-d $ FW_IP -- dport53-j
# Enable interaction between DNS
Iptables-F # Allow packets from port 22 to enter iptables-AINPUT-ptcp -- dport22-jACCEPT # Allow packets from port 22 to return iptables-AOUTPUT-ptcp -- sport22-mstate -- stateESTABLISHED-jACCEPTiptables-AOUTPUT- pudp -- dp
Iptables-F# Allow package
Run the following command: # enable port 80 iptables-IINPUT-ptcp-mstate -- stateNEW -- dport80-jACCEPT # save modification serviceiptablessave # restart serviceiptablesrestart # view the status serviceiptablesstatus note: in/etc/sysconfi
Run the
The first type keyword mainly includes host, net, port, such as host210.27.48.2, specifying 210.27.48.2 as a host, net202.0.0.0 specifying 202.0.0.0 as a network address, and port23 specifying port 23. if no type is specified, the default type is
Receive network packets from the specified IP port on the local machine (assuming the local ip address is 192.168.1.2, the local receiving port is 80) the tcpdump-s0host192.168.1.2andsrcport80-wzb_recieve.erl is forwarded to the specified IP port
E. monitor the local udp123 Port 123 as the ntp service port # The tcpdumpudpport123F system only monitors the communication packets of the host named hostname. The host name can be a local host or any computer on the network. The following command
The first type keyword mainly includes host, net, port, such as host210.27.48.2, specifying 210.27.48.2 as a host, net202.0.0.0 specifying 202.0.0.0 as a network address, and port23 specifying port number as 23. If no type is specified, the default
Linux is a cute little penguin, while FreeBSD is a little devil with a fork. Do you often hear people confuse Linux and BSD systems? Yes, I often hear from new users and even the media. Of course, the two actually have many similarities. for example,
Example 1), # iptables? AINPUT? Ptcp -- dport22? JLOG -- log-level5 -- log-prefix "IPTABLES:" -- log-level: log level is 5, -- log-prefix information is "IPTABLES:" for why log level is 5, possible
IptablesAn example of using the firewall with the
Grep (globalsearchregularexpression (RE) andprintouttheline, full search for regular expressions and print out rows) is a powerful text search tool that can use regular expressions to search for text, and print the matched rows. Unix grep families
Setting a firewall is very important for your Linux server. However, by default, CentOS settings cannot meet our needs. You can set up the iptables firewall by following the steps below: disable SELinux first. In general, SELinux is of no particular
What is VPN first? A virtual private network (VPN) is defined as a temporary and secure connection through a public network (usually the Internet). It is a secure and stable tunnel through a chaotic public network. A virtual private network is an
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service