Sunday , 2 April 2023
Home » Bài theo kỳ » Cấu hình dịch vụ Neutron trong OpenStack #2 – VPNaaS (VPN-as-a-Service)

Cấu hình dịch vụ Neutron trong OpenStack #2 – VPNaaS (VPN-as-a-Service)

Tiếp tục là cấu hình và thử nghiệm VPN as a Service (VPNaaS)

Mô hình thử nghiệm
null
Cấu hình dịch vụ VPNaaS (VPN-as-a-Service)

Tại Network note server, cài đặt gói

apt-get install openswan neutron-plugin-vpn-agent

Trong quá trình cài đặt, openswan sẽ hỏi bạn có tạo certificate X.509 để bảo mật các kết nối IPSec dùng cho OpenVPN sau này hay không, chọn No rồi Enter.

null

Tạo certificate X.509 tại Network server

dpkg-reconfigure openswan

Chọn Yes để restart openswan.

null

Chọn Yes để tạo certificate X.509

null
Chọn crete để tạo tạo certificate
null
Chọn độ dài mặc định cho khóa RSA là 2048bit
null
Chọn Yes để tạo self-signed certificate
null
Điền tên nước
null
Điền tên tổ chức/cty
null
####### Cấu hình tại Network note server ########

#Enable the VPN
#edit /etc/neutron/vpn_agent.ini
[DEFAULT] interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
[vpnagent] vpn_device_driver = neutron.services.vpn.device_drivers.ipsec.OpenSwanDriver
[ipsec] ipsec_status_check_interval = 60

####### Cấu hình tại Network note  và Controller note ########

#Enable the HAProxy plug-in and VPN by using the [service_providers] option
#edit /etc/neutron/neutron.conf
[service_providers] service_provider = VPN:openswan:neutron.services.vpn.service_drivers.ipsec.IPsecVPNDriver:default

 

# enable dashboard /etc/openstack-dashboard/local_settings.py
OPENSTACK_NEUTRON_NETWORK = {
‘enable_vpn’: True,
}

 

#Apply the settings by restarting the neutron services.

#controller server:
service neutron-server restart

#network server:
service neutron-vpn-agent restart
service neutron-dhcp-agent restart
service neutron-l3-agent restart
service neutron-metadata-agent restart
service neutron-plugin-openvswitch-agent restart

 

 

 Thử nghiệm VPNaaS

  • Mục tiêu: Kết nối 2 vùng mạng riêng với nhau bằng VPN site-to-site
  • Tạo vùng mạng riêng int_net_2 có subnet 172.17.73.0/24 kết nối với mạng ext_net thông qua router2
  • Launch  instance client-site-1 kết nối với int_net  client-site-2 kết nối với int_net_2. Lưu ý rằng security group của 2  instance này phải cho phép ping.

nullThử nghiệm ping từ client-site-1 sang client-site-2

null
Kết quả cho thấy không thể kết nối.

Trong mục IKE Policies của VPN, tạo ike-pool-1 với các cấu hình mặc định
null
Tương tự, tạo ike-pool-2, ta có 2 ike pool

nullTrong mục IPSec Policies, tạo ipsec-pool-1
null
Tương tự, tạo ipsec-pool-2, ta có 2 ipsec-pool

null
Trong mục VPN Service, ta tạo vpn-service-1

null
Tạo tiếp vpn-service-2

null
Trong mục IPSec Site Connections, tạo site1-to-site2

null
Tạo site2-to-site1

null
Kiểm tra kết nối giữa instance client-site-1 và client-site-2

null

Lượt xem (1267)

About Nguyên Ngọc

Networking and Communications

Xem thêm

Ladipage Là Gì ? Vì Sao Được Nhiều Marketer Ưa Chuộng?

Menu bài viết [hide] 1 Lịch sử phát triển : 2 Những lợi thế của Ladipage : 3 Vì …

Để lại bình luận:

Loading Facebook Comments ...

Leave a Reply

Your email address will not be published. Required fields are marked *