# VPN Site-to-Site

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeDdDsP4wK9xCoA9csI0_Him9GA8w7WHboeFWW5e50hL2UEg3NrCcIhGuPGgq29KRccEOIIuqj_tBgbHr4aX6SVhMnFXJ22j6rA4JF2TIl643rDVkxIrjblhoWrjfrwv_AALigo38YBci_BLkmdf80?key=YCqQNUWtmEPYeky4vj5AnhCL" alt=""><figcaption></figcaption></figure>

#### 1. Cấu hình trên VPN server

Cho phép tạo profile VPN client và định tuyến giữa router VPN client và router VPN server.

**Bước 1.** Sinh profile VPN client

* Chọn VPN -> VPN clients, tích chọn ô VPN Site-to-site và cấu hình các trường thông tin sau:
  * Tài khoản: Tên tài khoản
  * Mật khẩu:  Mật khẩu xác thực
  * Địa chỉ IP: là địa chỉ IP tĩnh mà ta muốn gán cho client này , IP phải nằm trong phạm vi subnet mà VPN Server cấp phát
  * Static Route: Dải mạng trên site VPN client cho phép truy cập tới dải mạng trên site VPN server (VD: 192.168.1.0/24)
  * Push Routes: Dải mạng trên site VPN server cho phép kết nối với dải mạng trên site VPN client (VD:172.16.86.0/24 )

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXc4vqZreSx_PKHfO8rlLdeZKXzt_81w_TK2fiLW9yJJ8ZiVfPzAMdw0dci6-tTg-efuGJ4XMn2flqIcoZtW_l2COHf5gYgSe9UnYZ0YrvkfsuEM1Y9xqkzwGtJQJBo1KP5MO5SEOw0xpVoHfTYx4A?key=YCqQNUWtmEPYeky4vj5AnhCL" alt=""><figcaption><p>Hình 17: Tạo profile cho VPN Client</p></figcaption></figure>

* Sau khi điền các thông tin cần thiết xong thì ấn nút Tạo để sinh ra 1 profile cho VPN client hỗ site-to-site. Trên giao diện cho phép tải profile mới sinh ra

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcOWjIOYPURKKOojK7Q7noXwRKxaD7E-nBvo4-lbZOGn5LIPiz1Edfh50p1fO78kG6OQk_u9qJze8kNTgN50Lif-HgkTV9UTbzCU8EsMi3-8kcRlUoTWJkHdXdiyz4iErEz7ENvACS2ksMWqbb4AlI?key=YCqQNUWtmEPYeky4vj5AnhCL" alt=""><figcaption><p>Hình 18: Danh sách VPN Clients</p></figcaption></figure>

#### 2. Cấu hình trên router VPN Client&#x20;

**Bước 1.**

* &#x20;Trên router VPN client, truy cập vào tab VPN-> Máy chủ VPN -> VPN site-to-site. Chọn nút Cấu hình và nhập thông tin tài khoản, mật khẩu. Sau đó chọn Upload để tải profile OpenVPN lên.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdcoJDjsv07RyQfeH4gnOJYHHoQD86N56W3J-bsNlqU9t8e_gnnr546L8QAR6EBbAR1JlDp5eg_BXQcazY2_rru_jQYyImda_xXnHGAiKi4QQSz8lTqIdpyn2DZzZfieY0nFM35I8COK-KN3nwQ0zY?key=YCqQNUWtmEPYeky4vj5AnhCL" alt=""><figcaption><p>Hình 19: Cấu hình VPN site to site</p></figcaption></figure>

**Bước 2.**&#x20;

* Sau khi đã cấu hình thành công thì ta sẽ ấn nút Khởi động để bắt đầu kết nối đến VPN server&#x20;

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfG3fSh5B5HaRUea6eCUeHkmxWOZevs50CTEeppPi2H1j__yoqrevJxOCLSDNeqU5hG0mdP36M_VJlx5zai86yx-Yf-SuV-pcDsbGCyBJBi8uyF60hlUopyn1UZZnO4kmvwHdtSSnt8hh3ejzQI9Q?key=YCqQNUWtmEPYeky4vj5AnhCL" alt=""><figcaption><p>Hình 20: Cấu hình thành công</p></figcaption></figure>

**Bước 3.**

* Di chuyển đến tab Firewall -> Cài đặt chung, chọn sửa firewall zone wan.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfcNPcRX_7nRkpEv7TRXTaVlzd9mPHtbFENPLZQOvvVLGCIN4-fP03hNFLjQsjEqh8JBfXPPmLIC7BdXodbYUAZLlvNMo8__b-vwyt4Q8nFKMrONEnwGTkwDhPt_Ulai7ZO0mCOcyXYKamc0uJoLg?key=YCqQNUWtmEPYeky4vj5AnhCL" alt=""><figcaption><p>Hình 21: Luật cho vùng mạng</p></figcaption></figure>

* Trong màn hình cấu hình cho vùng mạng này ta sẽ di chuyển đến mục Cài đặt nâng cao, rồi gán tun0 vào Thiết bị được áp dụng. Sau đó ấn Lưu rồi Lưu và áp dụng.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdJ8K2WHgMRR6l8FTJS7FJj4YH0Nx2m9KMOLMlmbyObYfE9FE-Ne-fhppF1TWLciWShQC1RaQqqZzXXzHYg9qED7ye2U18V5KWbQPNhmgokt0P4cH4pXRqLIeGOH-AXlRBkQjAcH1xFhiumIgv3cA?key=YCqQNUWtmEPYeky4vj5AnhCL" alt=""><figcaption><p>Hình 22: Cài đặt nâng cao</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.safegate.network/safegate-office/vpn/vpn-site-to-site.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
