5.3.3.4. リモートアクセスVPN構成例¶
動作確認バージョン: | Brocade 5600vRouter Version4.2R1S1 |
---|
Brocade 5600vRouter をVPNゲートウェイとし、クライアントから社内ネットワークへのVPNを構築する構成例を示します。
システム構成図¶
Client から L2TP/IPsec VPN プロトコルを使用してFWへ接続する構成を構築しています。
- Server-01 のゲートウェイとして、FW-01,02 でVRRPを設定し冗長構成としています。
注釈
- ClientのOSは "Windows Server 2012 R2" を使用しております。
- VPNクライアントは "Windows 標準 VPN クライアント" を使用しております。
- ServerのOSは "CentOS 7.1.1503" を使用しております。
- FTPサーバは "vsFTPd 3.0.2" を使用しております。
ファイアウォール設定の内容¶
ファイアウォールインタフェース設定
設定内容の確認のためにインタフェース設定を示しておりますが、実際にはインタフェース設定はカスタマポータル上で設定して頂く必要があります。
以下インタフェース設定コマンドを投入するとエラーが返ってきますのでご注意ください。
注釈
- インタフェース設定はカスタマポータル以外で設定することはできません。
- FW-01
set interfaces dataplane dp0s8 address 153.xx.xx.178/28
set interfaces dataplane dp0s11 address 192.168.3.28/28
- FW-02
set interfaces dataplane dp0s8 address 153.xx.xx.179/28
set interfaces dataplane dp0s11 address 192.168.3.29/28
VRRP設定
プライベートセグメントの冗長設定を以下に示します。
VRRP設定前に、必ずカスタマポータル上でVRRP通信許可設定を実施いただく必要があります。 VRRP用通信設定の登録 をご参照ください。
- FW-01
set interfaces dataplane dp0s11 vrrp vrrp-group 3 advertise-interval 20
set interfaces dataplane dp0s11 vrrp vrrp-group 3 preempt false
set interfaces dataplane dp0s11 vrrp vrrp-group 3 priority 150
set interfaces dataplane dp0s11 vrrp vrrp-group 3 rfc-compatibility
set interfaces dataplane dp0s11 vrrp vrrp-group 3 version 2
set interfaces dataplane dp0s11 vrrp vrrp-group 3 virtual-address 192.168.3.27
- FW-02
set interfaces dataplane dp0s11 vrrp vrrp-group 3 advertise-interval 20
set interfaces dataplane dp0s11 vrrp vrrp-group 3 preempt false
set interfaces dataplane dp0s11 vrrp vrrp-group 3 priority 20
set interfaces dataplane dp0s11 vrrp vrrp-group 3 rfc-compatibility
set interfaces dataplane dp0s11 vrrp vrrp-group 3 version 2
set interfaces dataplane dp0s11 vrrp vrrp-group 3 virtual-address 192.168.3.27
注釈
- VRRPのadvertise intervalは初期設定では基盤側においてVRRP通信が稀に不安定になることが確認されていたため20sec以上を推奨しておりましたが(2016年12月時点)、不安定事象が解消したためお客様のシステム構成に合わせ設計ください(2017年8月時点)。(3回連続でHello Packetを受信しなかった際に断検知します)。なお本設定を変更する場合、Backup側のファイアウォールから変更してください。Master側から変更すると、Backup側へのHelloパケット送信間隔が変わるため、Backup側もMasterに昇格し、両装置がMasterになる可能性があります。
- 製品仕様としてL2TP/IPsec使用時はVRRPのVIPを接続先に指定することが出来ません。その為、障害発生時にVPN接続の自動切替わり/切戻りはできず、クライアント側から手動で切り替える必要がございます。それに合わせてVRRPの preempt は無効化の設計としております。
VPN設定(L2TP/IPsec)
FW の L2TP/IPsec を利用したリモートアクセス設定を示します。
- 認証情報
ローカル認証ユーザ | test-user01 |
ローカル認証パスワード | testpass |
事前共有鍵パスフレーズ | testkey |
注釈
- 上記認証パラメータはテスト用のものです、実際には任意のパラメータを設定ください。
- FW-01
set security vpn ipsec nat-traversal enable
set security vpn ipsec nat-networks allowed-network 192.168.3.0/28
set security vpn l2tp remote-access authentication local-users username test-user01 password testpass
set security vpn l2tp remote-access authentication mode local
set security vpn l2tp remote-access client-ip-pool start 192.168.3.4
set security vpn l2tp remote-access client-ip-pool stop 192.168.3.9
set security vpn l2tp remote-access ipsec-settings authentication mode pre-shared-secret
set security vpn l2tp remote-access ipsec-settings authentication pre-shared-secret testkey
set security vpn l2tp remote-access outside-address 153.xx.xx.178
set security vpn l2tp remote-access outside-nexthop 153.xx.xx.190
- FW-02
set security vpn ipsec nat-networks allowed-network 192.168.3.0/28
set security vpn ipsec nat-traversal enable
set security vpn l2tp remote-access authentication local-users username test-user01 password testpass
set security vpn l2tp remote-access authentication mode local
set security vpn l2tp remote-access client-ip-pool start 192.168.3.4
set security vpn l2tp remote-access client-ip-pool stop 192.168.3.9
set security vpn l2tp remote-access ipsec-settings authentication mode pre-shared-secret
set security vpn l2tp remote-access ipsec-settings authentication pre-shared-secret testkey
set security vpn l2tp remote-access outside-address 153.xx.xx.179
set security vpn l2tp remote-access outside-nexthop 153.xx.xx.190
設定内容の確認
前述の設定が正しく投入されている場合、以下出力が確認できます。
- FW-01
user-admin@FW-01# show interfaces
interfaces {
dataplane dp0s8 {
address 153.xx.xx.178/28
}
dataplane dp0s11 {
address 192.168.3.28/28
vrrp {
vrrp-group 3 {
advertise-interval 20
preempt false
priority 150
rfc-compatibility
version 2
virtual-address 192.168.3.27
}
}
}
}
user-admin@FW-01# show security vpn ipse
vpn {
ipsec {
nat-networks {
allowed-network 192.168.3.0/28
}
nat-traversal enable
}
l2tp {
remote-access {
authentication {
local-users {
username test-user01 {
password "********"
}
}
mode local
}
client-ip-pool {
start 192.168.3.4
stop 192.168.3.9
}
ipsec-settings {
authentication {
mode pre-shared-secret
pre-shared-secret "********"
}
}
outside-address 153.xx.xx.178
outside-nexthop 153.xx.xx.190
}
}
}
- FW-02
user-admin@FW-02# show interfaces
interfaces {
dataplane dp0s8 {
address 153.xx.xx.179/28
}
dataplane dp0s11 {
address 192.168.3.29/28
vrrp {
vrrp-group 3 {
advertise-interval 20
preempt false
priority 20
rfc-compatibility
version 2
virtual-address 192.168.3.27
}
}
}
}
user-admin@FW-02# show security vpn
vpn {
ipsec {
nat-networks {
allowed-network 192.168.3.0/28
}
nat-traversal enable
}
l2tp {
remote-access {
authentication {
local-users {
username test-user01 {
password "********"
}
}
mode local
}
client-ip-pool {
start 192.168.3.4
stop 192.168.3.9
}
ipsec-settings {
authentication {
mode pre-shared-secret
pre-shared-secret "********"
}
}
outside-address 153.xx.xx.179
outside-nexthop 153.xx.xx.190
}
}
}
注釈
- パスワードの部分は * として表示されます。
Client 設定
Windows 標準のVPNクライアントの設定手順を以下に示します。
- コントロールパネル > ネットワークとインターネット > ネットワークと共有センター を選択
- 新しい接続またはネットワークのセットアップを選択
- 接続オプションの選択ウィンドウが出ますので「職場へ接続します」を選択し「次へ」
- 「インターネット接続(VPN)を使用します」を選択
- 「インターネット接続は後でセットアップします」を選択
- 次の画面で「インターネットアドレス」に接続先FWのIPを入力「接続先の名前」は任意のものを入力し「作成」
3. ネットワークと共有センター画面に戻ります。左上のアダプター設定の変更を選択
- 先ほど作成したVPN接続が確認できますので、右選択しプロパティを展開
- セキュリティタブ内の設定を以下の通り設定、OKを選択
VPNの種類 | IPsecを利用したレイヤー2トンネリングプロトコル(L2TP/IPSec) |
詳細設定→L2TP | 認証に事前共有キーを使う(キーはFWに設定した事前共有鍵のパスフレーズと同じもの) |
データの暗号化 | 暗号化が必要(サーバーが拒否する場合は切断されます) |
許可プロトコル | チャレンジ ハンドシェイク認証プロトコル、Microsoft CHAP Version2 |
以上で設定は完了です。
作成した接続をダブルクリックし、右側に出てくるネットワークの一覧からVPN接続を選択、サインイン情報を入力のうえ「OK」を選択してください。
通信の流れ¶
正常時はFW-01に対してVPN接続を行います。
VPN接続後、Client から Server へ対して Ping および FTP で通信確認を行います。
正常通信時の状態確認
正常通信時のファイアウォールの状態は以下のように確認できます。
- VRRPの状態
FW-01 が Master であること。
user-admin@FW-01:~$ show vrrp
RFC Addr Last Sync
Interface Group State Compliant Owner Transition Group
--------- ----- ----- --------- ----- ---------- -----
dp0s11 3 MASTER dp0vrrp1 no 47m19s <none>
FW-02 が Backup であること。
user-admin@FW-02:~$ show vrrp
RFC Addr Last Sync
Interface Group State Compliant Owner Transition Group
--------- ----- ----- --------- ----- ---------- -----
dp0s11 3 BACKUP dp0vrrp1 no 47m55s <none>
- VPNの状態
FW-01 に対してVPN接続がされていること。
user-admin@FW-01:~$ show vpn remote-access
Active remote access VPN sessions:
User Proto Iface Tunnel IP TX byte RX byte Time
---- ----- ----- ----------- ------- ------- ----
test-user01 L2TP ppp0 192.168.3.4 402 10.8K 00h05m28s
注釈
- FW-02へのVPN接続は行いません。よって、FW-02の出力はございませんので省略しております。
Clientの接続確認
IPアドレスの取得、Ping、FTPが成功することを確認します。
- ClientのVPN接続
接続先のアドレスプールよりIPアドレスが割り当てられています。
PS C:\Users\Administrator> ipconfig /all
※VPN接続のみ抜粋
PPP adapter VPN 接続(153.xx.xx.178):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VPN (153.xx.xx.178)
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.3.4(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 0.0.0.0
NetBIOS over Tcpip. . . . . . . . : Enabled
- Ping を用いて通信確認[OK]
PS C:\Users\Administrator> ping 192.168.3.18
Pinging 192.168.3.18 with 32 bytes of data:
Reply from 192.168.3.18: bytes=32 time=2ms TTL=63
Reply from 192.168.3.18: bytes=32 time=1ms TTL=63
Reply from 192.168.3.18: bytes=32 time=1ms TTL=63
Reply from 192.168.3.18: bytes=32 time=1ms TTL=63
Ping statistics for 192.168.3.18:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
PS C:\Users\Administrator>
- FTP を用いて通信確認[OK]
PS C:\Users\Administrator> ftp
ftp> open 192.168.3.18
Connected to 192.168.3.18.
220 (vsFTPd 3.0.2)
User (192.168.3.18:(none)): ftp-user
331 Please specify the password.
Password:
230 Login successful.
ftp> dir
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
226 Directory send OK.
ftp> put file01*
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
ftp: 4074 bytes sent in 0.00Seconds 4074000.00Kbytes/sec.
ftp> dir
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r-- 1 1001 1001 4074 Mar 18 10:51 file01.log
226 Directory send OK.
ftp: 71 bytes received in 0.00Seconds 71000.00Kbytes/sec.
ftp> bye
221 Goodbye.
障害発生時の通信の流れ¶
障害発生時は FW-02 に対してVPN接続を行います。
VPN接続後、Client から Server へ対して Ping および FTP で通信確認を行います。
注釈
- VPN接続はクライアント側から手動で接続先を切り替える必要があります。
注釈
インスタンス障害の試験方法として、FW-01 の VRRP を一時的に無効化する手法を採用しております。
任意の vrrp-group を停止/再開するコマンドは以下の通りです。
# 停止
set interfaces dataplane [INTERFACE NAME] vrrp vrrp-group [GROUP ID] disable
# 再開
delete interfaces dataplane [INTERFACE NAME] vrrp vrrp-group [GROUP ID] disable
障害発生時の状態確認
障害発生時のファイアウォールの状態は以下のように確認できます。
- VRRPの状態
FW-01 の VRRP が起動していないこと。
user-admin@FW-01:~$ show vrrp
RFC Addr Last Sync
Interface Group State Compliant Owner Transition Group
--------- ----- ----- --------- ----- ---------- -----
注釈
- FW-01 のVRRPは停止中のため、状態は表示されません。
FW-02 が Master であること。
user-admin@FW-02:~$ show vrrp
RFC Addr Last Sync
Interface Group State Compliant Owner Transition Group
--------- ----- ----- --------- ----- ---------- -----
dp0s11 3 MASTER dp0vrrp1 no 13s <none>
- VPNの状態
FW-02 に対してVPN接続がされていること。
user-admin@FW-02:~$ show vpn remote-access
Active remote access VPN sessions:
User Proto Iface Tunnel IP TX byte RX byte Time
---- ----- ----- ----------- ------- ------- ----
test-user01 L2TP ppp0 192.168.3.4 1.9K 12.4K 00h10m41s
注釈
- FW-01へのVPN接続は行いません。よって、FW-01の出力はございませんので省略しております。
Clientの接続確認
IPアドレスの取得、Ping、FTPが成功することを確認します。
- ClientのVPN接続
接続先のアドレスプールよりIPアドレスが割り当てられています。
PS C:\Users\Administrator> ipconfig /all
※VPN接続のみ抜粋
PPP adapter VPN 接続(153.xx.xx.179):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VPN (153.xx.xx.179)
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.3.4(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 0.0.0.0
NetBIOS over Tcpip. . . . . . . . : Enabled
- Ping を用いて通信確認[OK]
PS C:\Users\Administrator> ping 192.168.3.18
Pinging 192.168.3.18 with 32 bytes of data:
Reply from 192.168.3.18: bytes=32 time=2ms TTL=63
Reply from 192.168.3.18: bytes=32 time=1ms TTL=63
Reply from 192.168.3.18: bytes=32 time=1ms TTL=63
Reply from 192.168.3.18: bytes=32 time=1ms TTL=63
Ping statistics for 192.168.3.18:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 2ms, Average = 1ms
- FTP を用いて通信確認[OK]
PS C:\Users\Administrator> ftp
ftp> open 192.168.3.18
Connected to 192.168.3.18.
220 (vsFTPd 3.0.2)
User (192.168.3.18:(none)): ftp-user
331 Please specify the password.
Password:
230 Login successful.
ftp> dir
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r-- 1 1001 1001 17604 Mar 18 10:58 file01.log
226 Directory send OK.
ftp: 71 bytes received in 0.02Seconds 4.44Kbytes/sec.
ftp> put file02*
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
ftp: 17604 bytes sent in 0.00Seconds 17604000.00Kbytes/sec.
ftp> dir
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-r--r-- 1 1001 1001 17604 Mar 18 10:58 file01.log
-rw-r--r-- 1 1001 1001 17604 Mar 18 12:06 file02.log
226 Directory send OK.
ftp: 139 bytes received in 0.00Seconds 139000.00Kbytes/sec.
ftp> bye
221 Goodbye.
PS C:\Users\Administrator>