接続できたところまで確認した設定例を記載します。
ー目次
ー はじめに
- 本ページ内容はすべてサポート対象外となります。問い合わせには対応いたしません。
- 接続できることを保証するものではありません。
- 長期安定性試験や障害試験を実施しておりません。
- 本設定例を利用したことにより、被った損害、及び損失について、いかなる理由に関わらず、弊社は一切責任を負わないものとします。予めご了承ください。
ー 環境
構成:NAPTルータ配下のLinuxマシン
+-------+ +---------------+ +--------------------+
| PC +------+eth1 VyOS eth0+--------+ブロードバンドルータ +----- Internet---
+-------+ +---------------+ +--------------------+
VyOS 1.3-rolling-202004230117
ー VyOSの設定例
vyos@vyos:~$ show configuration
#一部記載省略
interfaces {
ethernet eth0 {
address eth0(WAN)側IP/MASK
hw-id XX:XX:XX:XX:XX:XX
}
ethernet eth1 {
address eth1(LAN)側IP/MASK
hw-id XX:XX:XX:XX:XX:XX
policy {
route tun-in
}
}
loopback lo {
}
vti vti0 {
address NAPT後アドレス/30
mtu 1280
}
}
nat {
source {
rule 10 {
outbound-interface vti0
translation {
address masquerade
}
}
}
}
policy {
route tun-in {
rule 10 {
protocol tcp
set {
tcp-mss 1280
}
tcp {
flags SYN
}
}
}
}
protocols {
static {
interface-route 0.0.0.0/0 {
next-hop-interface vti0 {
}
}
route IPSecGlobalIP/32 {
next-hop ブロードバンドルーターのIPアドレス {
}
}
}
}
vpn {
ipsec {
esp-group ESP1 {
compression disable
lifetime 7200
mode tunnel
pfs enable
proposal 1 {
encryption aes256
hash sha256
}
}
ike-group IKE1 {
close-action none
dead-peer-detection {
action restart
interval 10
timeout 5
}
ikev2-reauth no
key-exchange ikev2
lifetime 14400
proposal 1 {
dh-group 14
encryption aes256
hash sha256
}
}
ipsec-interfaces {
interface eth0
}
nat-networks {
allowed-network 0.0.0.0/0 {
}
}
nat-traversal enable
site-to-site {
peer IPSecGlobalIP {
authentication {
id hogehoge@nfv.nttpc.ne.jp
mode pre-shared-secret
pre-shared-secret PRESHARE
}
connection-type initiate
default-esp-group ESP1
ike-group IKE1
ikev2-reauth inherit
local-address eth0(WAN)側IP
vti {
bind vti0
esp-group ESP1
}
}
}
}
}
コメント
0件のコメント
記事コメントは受け付けていません。