1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

本当に備忘録です

本人がCloudflareを知ったことにより、後々不要になりそうな試行錯誤の結果を書き残しておきます。
今度は自宅とモバイルとのIKEv2として設定しなおしの予定。
補足などありませんのでご承知おきください。。。

先祖記事

環境

  • 実家(hachinohe)へのIPv4 over IPv6トンネル
    • これは単純に家のDS-LiteでないIPv4アクセスが欲しかったから(当時)
  • ConoHaと自宅サーバ間のIPv6トンネル
    • NFSアクセス用(そのうち廃止)

設定

Cisco

Current configuration : 3800 bytes

version 15.7
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname c891fj
!
boot-start-marker
boot-end-marker
!
no aaa new-model
!
ip domain list flets-east.jp
ip domain list iptvf.jp
ip cef
ipv6 unicast-routing
ipv6 cef
!
multilink bundle-name authenticated
!
license udi pid C891FJ-K9 sn **********
!
crypto ikev2 proposal ikev2Proposal
 encryption aes-cbc-256
 integrity sha256
 group 14
!
crypto ikev2 policy ikev2Policy
 proposal ikev2Proposal
!
crypto ikev2 keyring ikev2Key
 peer Hachinohe
  address <接続先アドレス>
  pre-shared-key <PSK>
 !
 peer ConoHa
  address <接続先アドレス>
  pre-shared-key <PSK>
 !
!
crypto ikev2 profile HachinoheProfile
 match identity remote address <接続先アドレス>
 identity local key-id HachinoheVPN
 authentication remote pre-share
 authentication local pre-share
 keyring local ikev2Key
!
crypto ikev2 profile ConoHaProfile
 match identity remote address <接続先アドレス>
 authentication remote pre-share
 authentication local pre-share
 keyring local ikev2Key
!
crypto isakmp keepalive 30
!
crypto ipsec transform-set HachinoheSet esp-aes 256 esp-sha256-hmac
 mode tunnel
crypto ipsec transform-set ConoHaSet esp-aes 256 esp-sha256-hmac
 mode tunnel
!
crypto ipsec profile ConoHaVPN
 set transform-set ConoHaSet
 set ikev2-profile ConoHaProfile
!
crypto ipsec profile HachinoheVPN
 set transform-set HachinoheSet
 set ikev2-profile HachinoheProfile
!
interface Tunnel1
 description Hachinohe
 ip address 192.168.255.1 255.255.255.252
 tunnel source Vlan1
 tunnel mode gre ipv6
 tunnel destination <接続先アドレス>
 tunnel protection ipsec profile HachinoheVPN
!
interface Tunnel2
 description conoha
 ip address 192.168.255.5 255.255.255.252
 tunnel source Vlan1
 tunnel mode gre ipv6
 tunnel destination <接続先アドレス>
 tunnel protection ipsec profile ConoHaVPN
!
!
!!!!! 以下省略 !!!!!
!
!
end

Linux

strongswan

  • /etc/swanctl/swanctl.conf
    connections {
        gw-gw {
            local_addrs = <ローカルIPv6アドレス>
            remote_addrs = <接続先IPv6アドレス>
    
            local {
                auth = psk
                id = <ローカルIPv6アドレス>
            }
    
            remote {
                auth = psk
                id = <接続先IPv6アドレス>
            }
    
            children {
                gre {
                    local_ts = dynamic[gre]
                    remote_ts = dynamic[gre]
                    mode = tunnel
    
                    esp_proposals = aes256-sha256-modp2048
                }
            }
    
            version = 2
            mobike = no
            proposals = aes256-sha256-modp2048
        }
    }
    
    secrets {
        ike-1 {
            id-1a = <ローカルIPv6アドレス>
            id-1b = <接続先IPv6アドレス>
            secret = "<PSK>"
        }
    }
    

ip gre トンネル

  • /etc/network/interfaces
    iface ip6gre4 inet static
    address 192.168.255.6/30
    pre-up ip -family inet6 tunnel add ip6gre4 mode ip6gre remote <接続先IPv6アドレス> local <ローカルIPv6アドレス>
    post-up route add -net 192.168.15.0/24 gw 192.168.255.5
    

謝辞

新卒同期がクラスメソッド社に転職していったので勝手に身近感

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?