labunix's blog

labunixのラボUnix

IX2015の先にあるSRX100HをNATで管理PCに公開してみる。

■IX2015の先にあるSRX100HをNATで管理PCに公開してみる。

 IX2015を触ってみた。
 http://labunix.hateblo.jp/entry/20160310/1457620532

 IX2015のNAPTでsshのポート転送をしてみる。
 http://labunix.hateblo.jp/entry/20160313/1457812181

■NATでVIPの172.16.16.253にアクセスしたら、
 10.26.7.3に転送する設定。

interface FastEthernet0/1.0
  ip nat enable
  ip nat static 10.26.7.3 172.16.16.253
  ip nat static network 10.26.7.0/24 172.16.16.0/24
exit
write memory

■sshログイン

$ ssh 172.16.16.253
Password:
--- JUNOS 12.1X46-D40.2 built 2015-09-26 02:25:28 UTC
labunix> 

■NAT変換テーブルを確認

# show ip nat translation 
Interface: FastEthernet0/1.0
NAT Cache - 1 entry, 511 free, 1 peak, 1 create, 0 overflow
Codes: S - Static
  Inside Address  Outside Address Time
S 10.26.7.3       172.16.16.253   3470  

# show ip nat statistics 
...
NAT Static - 2 entries
Inside Address   Outside Address    OutPkt    InPkt
10.26.7.3        172.16.16.253          20       23
10.26.7.0        172.16.16.0             0        0

NAPT Service - 1 entries
Prot Address:Port          Service Port   OutPkt    InPkt
tcp  10.26.7.3:22          22                136      228