RTX1000でフレッツスクエアとPPTPとIPsec。

※某大手IT企業内からもアクセスいただいている、
当サイトの人気記事ですw
 
RTX1000でなんでもやろう。と。
「業務用機だし、仕事が出来ればよくね?」というやる気のない人嫌いですw
 
手元にあるんだしwなんでもやらせようw貧乏だしwww
せっかく買ったRTX1000使い切るZE!と言う
熱い諸氏に俺のConfigをプレゼント。
 
これをRTX1000にブチこんでHeaven気分に。
RTX1100,RTX1200でも動作している。
最低限の設定に留めているconfigなので、うまくいかなくても、
変なポートが空いていて問題が起きても責任もちません。
 
※筆者は仕事でヤマハルーターを使ってネットワーク構築を行っています。
依頼をお考えの場合は、お問い合わせ下さい。 
 
●妄想設定は
192.168.11.1がLAN1(宅内LAN側)
LAN2がWAN側(ONUなりCTUなりADSLモデムへ)
LAN3は何も使わない。
PPTPを1接続とIPsecを1接続。
VPNまわりは斜体にしておいたので要らなければ抜いて。
 
●実現できる機能
・フレッツスクエア http://www.flets/ も当然見れる。
・フレッツスクエアv6 http://www.flets-v6.jp/ も見れる。
・もちろんUPnPもサポート!
・PPTPサポート
 
●環境別設定
ip filter 101091 pass * 192.168.11.150 tcp * www
ip filter 101092 pass * 192.168.11.150 tcp * 21
ip filter 101093 pass * 192.168.11.150 tcp * 22
ip filter 101094 pass * 192.168.11.150 tcp * 5900
nat descriptor masquerade static 1 1 192.168.11.150 tcp 21
nat descriptor masquerade static 1 2 192.168.11.150 tcp www
nat descriptor masquerade static 1 3 192.168.11.150 tcp 22
nat descriptor masquerade static 1 4 192.168.11.150 tcp 5900
上記設定はこの192.168.11.150でサーバーを立てているから。
フィルタに穴を空けて静的IPマスカレードしている。不要な場合は削除してくれ。
 
●Netvolante-DNSサービスの設定はこちら
中古でゲロ安で買ったユーザーにもサービスを提供してくれるヤマハは神だと思う。
ニコン羊羹を送りたいよ。
 
●このConfigを入れたRTXを起動した後の流れとして
1.PPPoEをして接続
接続していたルーターをdisconnectせずに抜いたら接続確立まで10分ぐらい掛かるかも。
ONUやCTUやADSLモデムも電源入れ直した方が吉。
CATVや衛星ブロードバンドサービスは接続機器のMACアドレスに対してIPアドレスを振っている場合が多いのでその場合はケーブルモデムかIDU/iCONの電源を切り入りして再起動。
2.Netvolante-DNSサービスでダイナミックDNSにIPアドレスを申告。
以後*****netvolante.jpアドレスでアクセスできるようになる。
無料サービスなのでもし運悪く落ちていても文句は言うな。
ほとんど落ちていないけど。ほんとヤマハは神だ。
3.PPTP接続待ち受け開始。。
4.IPsec接続を相手様に向かって開始。
以下のConfigでは
相手様が192.168.1.xxxアドレス体系なのでデフォルトルートに
ip route 192.168.1.0/24 gateway tunnel 2
を追加。192.168.1.xxx宛の通信をtunnel2経由とする。
相手様のRTXも同じ設定してこちらのDDNSアドレスに設定すればIPsecめでたく接続。
大体PPPoE確立後2分ぐらいで繋がる
 
注、ip routeの220.210〜アドレスはフレッツスクエア(みかか東日本)用。
当該地域以外は適宜変更よろしく。
 
●どうやってconfig入れるの?
メモ帳などで編集してtftpでrtxに送るのが楽ちんで良い。
RTX1000や1100は初期化状態ではIPアドレスを持っていない。
拙著RTX1000に挑戦「1・2・3」を読んでIPアドレスをLAN1に設定し、ファームウエアを最新にし、tftpの方法も解説しているのでそっちをまず読んで欲しい。
 
 
 
# RTX1000 Rev.8.01.28 (Mon Aug 4 17:13:15 2008)
# MAC Address :
# Memory 16Mbytes, 3LAN, 1BRI
# main: RTX1000 ver=b0 serial=
#
 
# If you want to clear ALL configuration to default,
# remove `#’ of next line.
 
clear configuration (まずコンフィグ飛ばさないと既存にマージされるのでエラいことになる)
 
#
# System configuration
#
 
login password ログインパスワード
administrator password 管理者パスワード
security class 2 on on
 
#
# IP configuration
#
 
ip route default gateway pp 1
ip route 192.168.1.0/24 gateway tunnel 2
ip route 220.210.194.0/25 gateway pp 2
ip route 220.210.195.0/26 gateway pp 2
ip route 220.210.195.64/26 gateway pp 2
ip route 220.210.196.0/25 gateway pp 2
ip route 220.210.196.128/26 gateway pp 2
ip route 220.210.197.0/25 gateway pp 2
ip route 220.210.198.0/26 gateway pp 2
ip route 220.210.199.32/27 gateway pp 2
ip route 220.210.199.64/28 gateway pp 2
ip route 220.210.199.144/28 gateway pp 2
ip route 220.210.199.160/27 gateway pp 2
ip route 220.210.199.192/27 gateway pp 2
ip route 220.210.199.200/29 gateway pp 2
ip route 192.168.1.0/24 gateway tunnel 2(ここで192.168.1.xxxな要求はtunnel2のIPsecに流れるようにしている)
 
#
# IPv6 configuration
#
 
ipv6 prefix 1 ra-prefix@lan2::/64(IPv6を受け流す設定)
 
#
# LAN configuration
#
 
ip lan1 address 192.168.11.1/24
ip lan1 proxyarp on
ipv6 lan1 address ra-prefix@lan2::1/64(ここから4行IPv6を受け流す設定)
ipv6 lan1 rtadv send 1
ipv6 lan1 mld router
ipv6 lan2 mld host
 
#
# ISDN configuration
#
 

### BRI 1 ###
 
 
#
# PP configuration
#
 
pp disable all
 
### PP 1 ###
 
pp select 1
pp keepalive use lcp-echo
pp always-on on
pppoe use lan2
pppoe auto connect on
pppoe auto disconnect off
pp auth accept pap chap
pp auth myname PPPoE接続ID パスワード
ppp lcp mru on 1454
ppp ipcp ipaddress on
ppp ipcp msext on
ppp ccp type none
ppp ipv6cp use off
ip pp mtu 1454
ip pp secure filter in 101000 101001 101002 101003 101020 101021 101022 101023 101024 101025 101030 101032 101080 101081 101082 101083 101091 101092 101093 101094
ip pp secure filter out 101010 101011 101012 101013 101020 101021 101022 101023 101024 101025 101099 101080 101081 101082 101083 dynamic 101190 101191 101192 101193 101194 101195 101196
ip pp intrusion detection in on reject=on(不正アクセス遮断、入り方向のみ)
ip pp nat descriptor 1
netvolante-dns hostname host pp 取得してね.aa0.netvolante.jp
pp enable 1
 
### PP 2 ###
 
pp select 2
pp always-on on
pppoe use lan2
pppoe auto connect on
pppoe auto disconnect off
pp auth accept pap chap
pp auth myname guest@flets guest
ppp lcp mru on 1454
ppp ipcp ipaddress on
ppp ipcp msext on
ppp ccp type none
ip pp mtu 1454
ip pp nat descriptor 2
pp enable 2
 
### PP anonymous ###
 
pp select anonymous
pp bind tunnel1
pp auth request mschap
pp auth username PPTP接続ユーザー名 パスワード(任意)
ppp ccp type mppe-any
ip pp remote address pool 192.168.11.160-192.168.11.170
pptp service type server
pp enable anonymous
 
#
# TUNNEL configuration
#
 
tunnel disable all
 
### TUNNEL 1 ###
 
tunnel select 1
tunnel encapsulation pptp
pptp tunnel disconnect time 1200
pptp keepalive use off
tunnel enable 1
 
### TUNNEL 2 ###
 
tunnel select 2
tunnel name IPsec-ydc
ipsec tunnel 101
ipsec sa policy 101 1 esp 3des-cbc sha-hmac
ipsec ike keepalive log 1 off
ipsec ike keepalive use 1 on icmp-echo 相手様ルーターローカルアドレス 5 3
ipsec ike always-on 1 on
ipsec ike local address 1 ipcp pp 1
ipsec ike pre-shared-key 1 text パスワード、事前共有鍵ってやつです。
ipsec ike remote address 1 相手様.aa0.netvolante.jp
ip tunnel tcp mss limit auto
tunnel enable 2

 
#
# IP filter configuration
#
 
ip filter 100000 reject * * udp,tcp 135 *
ip filter 100001 reject * * udp,tcp * 135
ip filter 100002 reject * * udp,tcp netbios_ns-netbios_dgm *
ip filter 100003 reject * * udp,tcp * netbios_ns-netbios_dgm
ip filter 100004 reject * * udp,tcp netbios_ssn *
ip filter 100005 reject * * udp,tcp * netbios_ssn
ip filter 100006 pass * * udp,tcp 445 *
ip filter 100007 pass * * udp,tcp * 445
ip filter 100099 pass * * * * *
ip filter 101000 reject 10.0.0.0/8 * * * *
ip filter 101001 reject 172.16.0.0/12 * * * *
ip filter 101002 reject 192.168.0.0/16 * * * *
ip filter 101003 reject 192.168.11.0/24 * * * *
ip filter 101010 reject * 10.0.0.0/8 * * *
ip filter 101011 reject * 172.16.0.0/12 * * *
ip filter 101012 reject * 192.168.0.0/16 * * *
ip filter 101013 reject * 192.168.11.0/24 * * *
ip filter 101020 reject * * udp,tcp 135 *
ip filter 101021 reject * * udp,tcp * 135
ip filter 101022 reject * * udp,tcp netbios_ns-netbios_ssn *
ip filter 101023 reject * * udp,tcp * netbios_ns-netbios_ssn
ip filter 101024 reject * * udp,tcp 445 *
ip filter 101025 reject * * udp,tcp * 445
ip filter 101030 pass * * icmp * *
ip filter 101032 pass * * tcp * ident
ip filter 101034 pass * * tcp,udp * domain
ip filter 101080 pass * * tcp * 1723
ip filter 101081 pass * * gre * *
ip filter 101082 pass * * udp * 500
ip filter 101083 pass * * esp * *
ip filter 101091 pass * 192.168.11.150 tcp * www
ip filter 101092 pass * 192.168.11.150 tcp * 21
ip filter 101093 pass * 192.168.11.150 tcp * 22
ip filter 101094 pass * 192.168.11.150 tcp * 5900
ip filter 101099 pass * * * * *
 
#
# IP dynamic filter configuration
#
 
ip filter dynamic 101190 * * ftp
ip filter dynamic 101191 * * domain
ip filter dynamic 101192 * * www
ip filter dynamic 101193 * * smtp
ip filter dynamic 101194 * * pop3
ip filter dynamic 101195 * * tcp
ip filter dynamic 101196 * * udp
 
#
# NAT Descriptor configuration
#
 
nat descriptor type 1 masquerade
nat descriptor masquerade static 1 1 192.168.11.150 tcp 21
nat descriptor masquerade static 1 2 192.168.11.150 tcp www
nat descriptor masquerade static 1 3 192.168.11.150 tcp 22
nat descriptor masquerade static 1 4 192.168.11.150 tcp 5900
nat descriptor masquerade static 1 6 192.168.11.1 tcp 1723
nat descriptor masquerade static 1 7 192.168.11.1 gre
nat descriptor masquerade static 1 8 192.168.11.1 esp
nat descriptor masquerade static 1 9 192.168.11.1 udp 500

 
#
# IPSEC configuration
#
 
ipsec auto refresh on
 
#
# IPv6 filter configuration
#
 
#
# IPv6 dynamic filter configuration
#
 
#
# Queueing configuration
#
 
#
# SYSLOG configuration
#
 
#
# TFTP configuration
#
 
tftp host any
 
#
# TELNETD configuration
#
 
#
# DHCP configuration
#
 
dhcp service server
dhcp server rfc2131 compliant except remain-silent
dhcp scope 1 192.168.11.100-192.168.11.149/24
 
#
# DHCPC configuration
#
 
#
# DNS configuration
#
 
dns service recursive
dns server pp 2
dns server select 100001 pp 2 any flets
dns server select 500001 pp 1 any . restrict pp 1
dns server select 500002 pp 2 any . restrict pp 2
dns private address spoof on
 
#
# WINS configuration
#
 
#
# SNMP configuration
#
 
#
# Schedule configuration
#
 
#
# TCP configuration
#
 
pptp service on
 
#
# HTTPD configuration
#
 
#
# Netvolante DNS configuration
#
 
#
# UPnP configuration
#
 
upnp use on
upnp external address refer pp 1
 
#
# Status Notify configuration
#
 

# If you want to save configuration to Nonvolatile memory,
# remove `#’ of next line.
 
save(NVRAM(不揮発メモリ)にConfigを書き込む。saveの頭に#入っていると電源切るとconfig飛ぶよ)
 
 
 
はい。ここまで。
 

カテゴリー: ネットワーク パーマリンク 拍手する

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です