NAT conversion of a source IP address

Operation Confirmed Version:
 Brocade 5600vRouter Version4.2R1S1
Specifying communications originated from a specific source IP address and performing NAT conversion of the source IP address

Presumed case for sample setting

  • To subject packets which are output from interface “dp0s6” to NAT conversion

  • To convert source IP address “192.168.2.6” into “192.168.3.5”

Configuration diagram
nat_fig1

Setting flow in a presumed case

1.Setting the rule name for source NAT to 10
2.Setting the source IP address to be converted
3.Determining interface dp0s6 for execution of NAT conversion
4.Setting the post-conversion source IP address

Command to be entered with CLI

set service nat source rule 10 source address '192.168.2.6'
set service nat source rule 10 outbound-interface 'dp0s6'
set service nat source rule 10 translation address '192.168.3.5'
The configuration after completion of appropriate settings is as follows.
service {
       nat {
               source {
                       rule 10 {
                               outbound-interface dp0s6
                               source {
                                       address 192.168.2.6
                               }
                               translation {
                                       address 192.168.3.5
                               }
                       }
               }
       }

Operation check result

As the result of communications forwarded from server “192.168.2.6” in the verification configuration diagram to “192.168.3.3”, conversion into “192.168.3.5” was confirmed through the access log of the web server, and thus it was also confirmed that one-to-one NAT conversion for a source IP address worked.
# From server(192.168.2.6) to Web(192.168.3.3) → OK

test@ubu01:~$ wget -O - http://192.168.3.3/ > /dev/null
--2016-07-29 10:50:25--  http://192.168.3.3/
Connecting to 192.168.3.3:80 ... Connected
200 OK
Length: 616 [text/html]
`STDOUT' saving

100%[========================================================================================================================================================================================================>] 616         --.-K/s   Time 0s

2016-07-29 10:50:25 (132 MB/s) - stdout へ出力完了 [616/616]

# Web Server Access Log

test@web1:~$ tail  /usr/local/nginx/logs/access.log

192.168.2.6 - - [29/Jul/2016:10:50:25 +0900] "GET / HTTP/1.1" 200 616 "-" "Wget/1.15 (linux-gnu)" "-"
192.168.3.5 - - [29/Jul/2016:10:53:59 +0900] "GET / HTTP/1.1" 200 616 "-" "Wget/1.15 (linux-gnu)" "-"