It’s time to NAT !!!

NAT itu gunanya buat apa sih ????

IPv4 (yang sekarang lagi kita pake di dunia saat ini buat pengalamatan device di jaringan computer)…terbagi atas IP Private dan IP Public…kenapa begitu ?

It’s to prevent IP exhaustion

Nah..IP private sendiri hanya berguna di local…anybody can use it and configure it….

Sedangkan IP Public berguna untuk berhubungan dengan network lain / cloud..ato yang sering kita bilang…INTERNET

Nah…bagaimana IP Private di kantor / local kita bisa internetan ??? cara nya adalah dengan mengubah IP Private ke Public donk ??

Apa yang bisa ngubah IP Private ke Public ??? ISP lah…wkwkwk

Tapi cara mengubah IP private ke Public itulah yang disebut NAT (Network Address Translation) , konfig nya di router

Biasanya klo dalam topology jaringan, NAT itu di aplikasikan di Stub Topology

Apa tu topology stub…here’s the idea…

Stub = Only 1 exit to the outside/other side….

Inside local address = Private Address..’nuff said

Inside Global Address = Address “terjemahan” si ISP buat IP private lo…

Outside Global Address = Destination IP

Tipe-tipe dari NAT

Ada 2 tipe NAT, Statis dan Dinamis

  • Static NAT: menggunakan metode 1:1…alias 1 private address dengan 1 public address, contoh computer punya IP private 192.168.X.X, ketika di NAT..dikasi IP 202.134.X.X…di kasinya tetap (Fix), static NAT biasanya digunakan buat host2 yang memang harus punya address konsisten/ga ganti2….kek web server…dan host game…biasanya buat create DotA…
  • Dynamic NAT: konsepnya sama kek DHCP…ada pool buat nampung public IP yang disediain…contohnya Speedy…liat aja klo kita restart modem…IP Public nya suka ganti2…(cek di whatismyip.com)

NAT Overload

NAT overload kadang disebut juga PAT (Port Address Translation) digunakan untuk menampung multiple private IP addresses ke 1 alamat IP public, ini metode paling umum dipake di ISP, aaaannnnnnnnddddd that’s why until recently we never run out of IPv4….

Figure 1-2 computer masing2 dengan IP 10.10 dan 10.11 ingin konek ke internet

Figure 2-NAT Router kemudian membaca private IP dari masing2 client beserta PORT nya…di convert ke public IP yang sama DENGAN port yang berbeda

PERTANYAANNYA ADALAH….GIMANA KLO YANG NGIRIM PORT NYA SAMA ??

Jawabannya pake gambar lagi…

Figure 3-Computer B (10.11) dengan port 1444 kirim paket

Figure 4-“ok…gw konversi jadi public IP dengan port 1444 jg” kata router NAT

Figure 5-komputer C (10.12) mau kirim juga..port nya SAMA..1444

Figure 6-“weleh…portnya sama…ya uda gw ganti port nya jadi 1445” kata router NAT…nanti pas paket dikirim balik…portnya tetep 1445 buat IP 10.12

NAT Benefit dan Drawback

SAATNYA KONFIGGG !!!

*ane rada males nyontohin langsung…copas aja dah

Static NAT Configuration

Static NAT Configuration Example

Dynamic NAT Configuration

Dynamic NAT Network

Dynamic NAT Configuration Example

NAT Overload Configuration

NAT Overload Configuration Example (contoh gambar sama dengan dynamic NAT)

NAT Overload with Public IP Pool Configuration Example (contoh gambar sama dengan dynamic NAT)

NOW WE TALK ABOUT PORT FORDWARDING

Klo kita mengaplikasikan NAT di network kita….berarti klo kita mo telnet…ato mo “masuk” lebih dalam ke network kita secara remote susah donk ?? karena ada proses translate IP nya itu…jadi GA BISA MASUK LANGSUNG KE IP YANG KITA TUJU

Contoh: ip kita 192.168.1.10 di merauke, papua…*seeed jauh amattt* trus kita mo ping 192.168.1.1-nya router di Zimbabwe…*bwuahahahah…makin gila gw*
, pasti nya butuh IP translation…apa lagi dengan ISP yang berbeda…sedangkan kita BENER-BENER pengen nge-ping / telnet 192.168.1.1 nya…END-TO-END Tracebility nya lost..gara2 NAT (liat NAT Benefit and Drawback diatas)

Untuk itulah ada yang disebut port forwarding

…untuk port forwarding tergantung dari vendor si config nya…kita liat yang dari Linksys nya Cisco yah….(plus bahasa inggris nya nih…gw males terjemahin)

For example, in the figure, HTTP service requests coming into this Linksys is now forwarded to the web server with the inside local address of 192.168.1.254.

If the external WAN IP address of the SOHO router is 209.165.200.158, the external user could enter http://209.165.200.158 and the Linksys router would redirect the HTTP request to the internal web server at IP address 192.168.1.254, using the default port number 80.

We could specify a port different from the default port 80. However, the external user would have to know the specific port number to use.

The approach you take to configure port forwarding depends on the brand and model of the broadband router in the network. However, there are some generic steps to follow. If the instructions supplied by your ISP or that came with the router do not provide adequate guidance, the website http://www.portforward.com provides guides for several broadband routers. You can follow the instructions to add or delete ports as required to meet the needs of any applications you want to allow or deny.

Verifying NAT Configuration

Verbose disini ibarat nambahin detail2 yang ga di tampilkan dengan hanya mengetikkan sh ip nat tr

The extended means it is looking at the extra information.  For example source and destination ports and IP addresses, as opposed to just the source addresses (diambil dari Learningnetwork.cisco.com from Paul Stewart, CCIE Security)

CLEARING IP NAT TRANSLATION

DEBUG IP NAT

WOKEH…..THATS ALL FOLKS FOR TODAY…