Iptables using multiport to add multiple discontinuous ports for disc dancing, 01:26, Linux technology, reviews (0), references (0), reading (12214), Via site original Big | c3> Use multiport to add multiple ports that are not connected and can add up to 15 groups. As follows-A input-p tcp-m multiport–dport 21:25,135
; ServerAdmin [email protected]DocumentRoot "G:PHPABC"ServerName dummy-host2.abc.comErrorlog "Logs/dummy-host2.abc.com-error.log"Customlog "Logs/dummy-host2.abc.com-access.log" common7. Save and restart Apache.Note:1, the above code is mainly modified port and directory, 80 port corresponding directory for the g:php,8080 port corresponding directory for G:PHPABC;2, the newly added port corresponding directory must be under the Apache directory;3. Open http://localhost:8080 to access the G:PHPA
", such as:/yourpath/server/httpd/conf/my-httpd-vhosts.conf, and enter the following configuration, Save. Namevirtualhost *:80include/yourpath/server/httpd/conf/vhosts/80.confnamevirtualhost *:81include/yourpath/server /httpd/conf/vhosts/81.confnamevirtualhost *:82include/yourpath/server/httpd/conf/vhosts/82.confThis file is introduced in the httpd.conf configurationServerRoot "/yourpath/server/httpd" Listen 80Listen 82Listen 84include/yourpath/server/httpd/my-httpd-vhosts.confCreate a new three
the home directory of Tomcat, open the Conf folder, locate and open the Server.xml file. Edit the Server.xml file and add it to the
3Follow the configuration in step 2 to save and start Tomcat.You can use domain1 access to Web1, and domain2 access to WEB2.END
Tomcat for multi-domain access (using a different port number)
Note: In contrast to the second case, the current situation should be applied very commonly.
Locate the Tomcat home directory, open the Conf folder, an
/) to access different sites, you need to add at the bottom of the file:# Multi-Port virtual host configuration #ServerName localhostDocumentRoot D:\xampp\htdocs\yii# dedecms_test #ServerName localhostDocumentRoot D:\xampp\htdocs\yiiIf you want to use different domains to access different websites, you need to add them at the bottom:# Multi-domain Virtual host configuration #ServerName www.a.comDocumentRoot D:\xampp\htdocs\yiiServerName www.b.comDocumentRoot D:\xampp\htdocs\magento5. The most im
| grep 0.0.0.0:80
Query the currently running Nginx path with the appropriate process ID (for example: 4562):ll /proc/4562/exe
Once you get to the Nginx execution path, use the-t parameter to get the corresponding profile path for that process, such as:```/usr/local/nginx/sbin/nginx-t
Nginx:the configuration file/usr/local/nginx/conf/nginx.conf syntax is OKNginx:configuration file/usr/local/nginx/conf/nginx.conf Test is successful## 添加匹配规则在已经配置好的443端口下,继续添加location规则HTTPS Server#s
This article mainly introduced the Phpstudy configuration Multi-site multi-domain and the multi-port method, has the certain reference value, has the interest to be possible to understand
This article describes the Phpstudy configuration multi-site multi-domain and multiport method, share to everyone, but also to leave a note
The WWW directory has three project directories: a b C
Apache default httpd port is 80, Site Directory is D:\WWW\a
1. Configur
SNAT--to $DIANXIN# iptables-t nat-a postrouting-s 192.168.0.0/24-d 222.240.0.0/13-j SNAT--to $DIANXIN# iptables-t nat-a postrouting-s 192.168.0.0/24-j SNAT--to $ access to the address of the Netcom line network card# IP route Flush Cache2.1.6 adding similar routesIf ["$ALLOW _access_client"! = ""]; ThenFor LAN in ${allow_access_client}; Do{Iptables-a forward-p t
Iptables-I INPUT-p icmp -- icmp-type Echo-Reply-j ACCEPT
Iptables-I INPUT-p icmp -- icmp-type destination-Unreachable-j ACCEPT
10. Do not forward packets from hosts and from the MAC address 00: 0C: 29: 27: 55: 3F.Iptables-a forward-m mac -- mac-source 00: 0c: 29: 27: 55: 3F-j DROP
Note: iptables uses the "-m module keyword" form to call display matching. Here w
) Create sites and Web documents for each virtual web based on configuration file settings(4) Open a browser on the client to access the virtual Web host4, Port-based virtual hostPort-based virtual hosts are typically used only for the same Web site, and the IP address is often the same for the site name, but different TCP ports provide access to different Web content. The port number of the server should be explicitly indicated when the browser accesses a non-80 port. such as access to http://w
the existing database directly, but pay attention to the configuration of the permissions.Start all DB instancesMysqld_multi--defaults-extra-file=/etc/my_multi.cnf StartConfigure the same root password for each database (as in/etc/my_multi.cnf)Mysqladmin-s/data1/mysql.sock-uroot password redhatmysqladmin-s/data1/mysq2.sock-uroot password RedhatThis is the end of the entire configuration.Related content# log path/var/log/mysqld_multi.log# start all DB instances Mysqld_multi--defaults-extra-file=
Use the Iptables string extension module primarily, use the string parameter to block access to the HTTP/HTTPS service for a specific Web site, and use the hex-string parameter to prevent DNS resolution for a specific domain name.For example, block access to Baidu.com's Http/https service. Where the--string parameter specifies the string keyword that is contained in the Web site address that needs to be masked,--algo specifies a string matching algori
.#------------------------------------------------------------------------------# Allow loopback interface to do anything.$IPTABLES -A INPUT -i lo -j ACCEPT$IPTABLES -A OUTPUT -o lo -j ACCEPT# Allow incoming connections related to existing allowed connections.$IPTABLES -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT# Allow outgoing connections EXCEPT inva
used to match the packet can match a single port or a range, for example:
-- Sport 22: 80
Indicates that ports from 22 to 80 are qualified. to match multiple discontinuous ports, you must use -- multiport
Parameters. For more information, see the following section. You can use it when matching the port number! Operator for reverse matching.
Parameter -- dport, -- destination-port
Example iptables-a input-p
run of the XXX program, you can set the firewall rules on the OUTPUT chain: ~]# iptables-a output-d 172.16.0.1-p TCP--sport 22- J ACCEPT ~]# iptables-a output-j REJECT ~]# iptables-i output-d 172.16.0.0/16-p tcp--sport 80-j accep T ~]# iptables-i OUTPUT 2-p ICMP--icmp-type echo-request-j Accept network firewall basic
Iptables usage instructions, iptables usageI. Preface The firewall is actually used to implement access control in Linux. It can be divided into two types: hardware or software firewalls. In any network, the firewall must work on the edge of the network. Our task is to define how the firewall works. This is the firewall policy and rules, so that it can detect inbound and outbound IP addresses and data.Curre
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.