Lvs-dr,https

Source: Internet
Author: User

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/74/56/wKioL1YadfXR8WPpAALx_mdwEAA338.jpg "title=" LV-DR topology diagram (different network segments). png "alt=" wkiol1yadfxr8wppaalx_mdweaa338.jpg "/>



<<<<<<<<<<<<<<<<<<<Windows>>>>>> >>>>>>>>>>>>>>>>>>>
At the command line prompt:
Route-p Add 1.2.3.0/24 172.16.249.107
(Route delete 1.2.3.0/24)

<<<<<<<<<<<<<<<<<<<Router>>>>>>> >>>>>>>>>>>>>>>>>>>>
Nic 1:brige (Auto Get)
Nic 2:vmnet2
Setup (set up NIC 2)
Eth1
Eth1
192.168.20.1
255.255.255.0

eth1:0
eth1:0
1.2.3.5
255.255.255.0

Service Network restart
Ifconfig
Vim/etc/sysctl.conf
Net.ipv4.ip_forward = 1

Sysctl-p
Ping 172.16.249.109-i 192.168.20.1 (required)
Ping 172.16.249.109-i 1.2.3.5 (required)
No, #ping 172.16.249.109-i eth1--.

<<<<<<<<<<<<<<<<<<<real Server>>>>>> >>>>>>>>>>>>>>>>>>
Network card: VMnet2
Setup
Eth0
Eth0
192.168.20.3 (4)
255.255.255.0
192.168.20.1

Service Network restart
Ifconfig
Ping 172.16.249.109 (must drip)
Vim/etc/sysctl.conf
Net.ipv4.conf.eth0.arp_ignore = 1
Net.ipv4.conf.eth0.arp_announce = 2
Net.ipv4.conf.all.arp_ignore = 1
Net.ipv4.conf.all.arp_announce = 2

Sysctl-p
Ifconfig lo:0 1.2.3.4/24 broadcast 1.2.3.4 Up (restart network, system will fail)
Route add-host 1.2.3.4 Dev lo:0 (Restart the network, the system will expire)
echo "Web server 1 (2)" >/var/www/html/index.html
Service httpd Start
#curl http://192.168.20.3
#curl http://192.168.20.4

<<<<<<<<<<<<<<<<<<<Director>>>>>> >>>>>>>>>>>>>>>>>>
Network card: VMnet2
Setup
192.168.20.2
255.255.255.0
192.168.20,1

Service Network restart
Service Iptables Stop
Ifconfig
Ping 192.168.20.1
Ping 192.168.20.3
Ping 192.168.20.4
Curl http://192.168.20.3
Curl http://192.168.20.4
Ifconfig eth0:0 1.2.3.4/24 broadcast 1.2.3.4 Up (restart network, system lost)
Route add-host 1.2.3.4 Dev eth0:0 (Restart network, system lost)
Route-n
Ping 172.16.249.109-i 192.168.20.2 (indispensable)
Ping 172.16.249.109-i 1.2.3.4 (indispensable)
Yum-y Install Ipvsadm
Vim lvs-dr.sh
#!/bin/bash
#
Ipvsadm-c
Ipvsadm-a-T 1.2.3.4:80-s RR
Ipvsadm-a-T 1.2.3.4:80-r 192.168.20.3-g
Ipvsadm-a-T 1.2.3.4:80-r 192.168.20.4-g
Ipvsadm-l-N

Bash lvs-dr.sh


================================ HTTPS ===================================
================================ HTTPS ===================================

<<<<<<<<<<<<<<<<<<<<< CA (Director) >>> >>>>>>>>>>>>>>>>>>>>>
Date
Cd/etc/pki/ca
(Umask 077;openssl genrsa-out PRIVATE/CAKEY.PEM 2048)
OpenSSL Req-new-x509-key private/cakey.pem-out cacert.pem-days 10000
CN
Guangdong
ShenZhen
Changlinux
Ca
Ca.changlinux.com
[Email protected]


<<<<<<<<<<<<<<<<<<<<real Server1>>>> >>>>>>>>>>>>>>>>>>>>>>
Date
Cd/etc/httpd
mkdir SSL
CD SSL
(Umask 077;openssl genrsa-out httpd.key 2048)
OpenSSL req-new-key httpd.key-out httpd.csr-days 365
CN
Guangdong
ShenZhen
Changlinux
Web
Www.changlinux.com
[Email protected]

SCP HTTPD.CSR [Email protected]:/root

<<<CA>>>
OpenSSL ca-in/root/httpd.csr-out certs/www.changlinux.com.crt-days 365
SCP CERTS/WWW.CHANGLINUX.COM.CRT [Email protected]:/etc/httpd/ssl/

<<<real server1>>>
httpd-m | grep SSL
Yum-y Install Mod_ssl
Vim/etc/httpd/conf.d/ssl.conf
<virtualhost *:443>
ServerName www.changlinux.com
Sslcertificatefile/etc/httpd/ssl/www.changlinux.com.crt
Sslcertificatekeyfile/etc/httpd/ssl/httpd.key

Service httpd Restart







<<<<<<<<<<<<<<<<<<<<real Server2>>>> >>>>>>>>>>>>>>>>>>>>>>
Date
Cd/etc/httpd
mkdir SSL
CD SSL
(Umask 077;openssl genrsa-out httpd.key 2048)
OpenSSL req-new-key httpd.key-out httpd.csr-days 365
CN
Guangdong
ShenZhen
Changlinux
Web
Www.changlinux.com
[Email protected]

SCP HTTPD.CSR [Email protected]:/root

<<<CA>>>
OpenSSL ca-in/root/httpd.csr-out certs/www.changlinux.com.crt-days 365
SCP CERTS/WWW.CHANGLINUX.COM.CRT [Email protected]:/etc/httpd/ssl/

<<<real server2>>>
httpd-m | grep SSL
Yum-y Install Mod_ssl
Vim/etc/httpd/conf.d/ssl.conf
<virtualhost *:443>
ServerName www.changlinux.com
Sslcertificatefile/etc/httpd/ssl/www.changlinux.com.crt
Sslcertificatekeyfile/etc/httpd/ssl/httpd.key

Service httpd Restart





<<<<<<<<<<<<<<<<<<<Director>>>>>> >>>>>>>>>>>>>>>>>>
Vim lvs-dr-ssl.sh
#!/bin/bash
#
Ipvsadm-c
Ipvsadm-a-T 1.2.3.4:443-s RR
Ipvsadm-a-T 1.2.3.4:443-r 192.168.20.3:443-m
Ipvsadm-a-T 1.2.3.4:443-r 192.168.20.4:443-m
Ipvsadm-l-N

Bash lvs-dr-ssl.sh


<<<<<<<<<<<<<<<<<<<<<<<<<<< Windows>>>>>>>>>>>>>>>>>>>>>>>>> >>>>
1. Browser Import CA Certificate
2. Modify the Hosts file
3. Https://www.changlinux.com Access



Lvs-dr,https

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.