我们公司在客户现场交付、安装和维护定制构建硬件。在所有情况下,交付的设置都至少包含 1 个服务器和 2 个网络设备。为了保持对网络的控制,我们在客户网络内设置了一个单独的网络,我们所有的硬件都通过放置一个额外的路由器连接到该网络。所有“我们的”客户网络都通过 IPSec 连接连接到我们的办公室。
所描述的设置使我们可以从我们的总部直接访问客户站点的硬件。我们的防火墙阻止来自客户站点的请求进入我们的办公室网络,因此客户无法访问我们总部的任何设备。他们也看不到其他客户网络中的设备。到目前为止,一切都按预期进行。
几周后,我们在希腊有了一个新办公室,它也通过 IPSec 连接到我们的主办公室,就像我们客户站点的连接方式一样。我在办公室站点配置了一些额外的防火墙规则,以便其他办公室可以访问我们主要办公室网络内的设备。除了能够访问我们办公室的设备外,它们还应该能够访问客户站点。我尝试在希腊办公室路由器内设置路由,并尝试在我们的主办公室设置一些客户路由,但我无法使其正常工作。
我们在我们的主要办公室使用 pfSence,目前在希腊办公室使用 Edgerouter(我知道 ER 它在此交换中不受支持,但我的问题与 Edgerouter 无关)。这个想法是希腊办事处的设备通过我们的总部连接到我们的客户网络。我们也不想为每个新客户做“希腊特定配置”。
我读了这篇文章并理解了理论,但无法将其付诸实践。
网络
- 总公司:10.128.10.0/24
- 客户网络:10.130.x.0/24(其中 x 因客户而异)
- 希腊办公网络:10.130.2.0/24
我尝试了什么:
- 在希腊办公室路由器上设置路由:10.130.0.0/16 via 10.128.10.1
- 在总部设置路由:10.130.0.0/16 via 10.128.10.1(因为我可以从这个网络到达客户网络)
- 允许从 10.130.2.0/24 到所有“任何”网络的所有流量(和协议)
我希望我提到了所有必需的信息,如果没有让我知道!我是软件工程师,不是网络工程师 ;-)
更新 1:
这就是 IPSec 连接的配置方式(在总部)。
<phase1>
<ikeid>5</ikeid>
<iketype>ikev2</iketype>
<interface>wan</interface>
<remote-gateway>domain.no-ip.org</remote-gateway>
<protocol>inet</protocol>
<myid_type>myaddress</myid_type>
<myid_data></myid_data>
<peerid_type>fqdn</peerid_type>
<peerid_data>domain.no-ip.org</peerid_data>
<encryption>
<item>
<encryption-algorithm>
<name>aes</name>
<keylen>128</keylen>
</encryption-algorithm>
<hash-algorithm>sha256</hash-algorithm>
<dhgroup>14</dhgroup>
</item>
</encryption>
<lifetime>28800</lifetime>
<pre-shared-key>Some_Key_Here</pre-shared-key>
<private-key></private-key>
<certref></certref>
<caref></caref>
<authentication_method>pre_shared_key</authentication_method>
<descr><![CDATA[Some IP Sec connection]]></descr>
<nat_traversal>on</nat_traversal>
<mobike>off</mobike>
<closeaction></closeaction>
<margintime></margintime>
<responderonly></responderonly>
</phase1>
<phase2>
<ikeid>5</ikeid>
<uniqid>5efc4de77ba1a</uniqid>
<mode>tunnel</mode>
<reqid>1</reqid>
<localid>
<type>network</type>
<address>10.128.0.0</address>
<netbits>16</netbits>
</localid>
<remoteid>
<type>network</type>
<address>10.130.4.0</address>
<netbits>24</netbits>
</remoteid>
<protocol>esp</protocol>
<encryption-algorithm-option>
<name>aes</name>
<keylen>128</keylen>
</encryption-algorithm-option>
<encryption-algorithm-option>
<name>aes128gcm</name>
<keylen>128</keylen>
</encryption-algorithm-option>
<hash-algorithm-option>hmac_sha256</hash-algorithm-option>
<pfsgroup>14</pfsgroup>
<lifetime>3600</lifetime>
<pinghost>10.130.4.1</pinghost>
<descr><![CDATA[axn_int to external]]></descr>
</phase2>
它还代表客户站点的配置。客户站点将 10.130.4.0/24 作为本地网络,将 10.128.0.0/16 作为远程网络。我是否正确理解我还需要添加第二个阶段 2,例如:
- 客户现场:
- 本地 10.130.4.0/24
- 远程 10.130.0.0/16
- 总公司
- 本地 10.130.0.0/16
- 远程 10.130.4.0/24
或者“只是”需要在客户设备上添加路由,例如:
- 10.130.0.0/16 通过 10.128.10.1
