Salam Oprek-ers,
Pada kesempatan kali ini saya akan menjelaskan cara melakukan port forwarding pada Ubunt Server (Ubuntu Desktop juga bisa) menggunakan perintah “iptables” pada terminal ubuntu. Sebelum kita melangkah lebih jauh, mari kita coba cari tau apa yang dimaksud dengan “Port Forwarding” itu sendiri. Yah, mudah saja, karena internet sudah menyala tinggal googling aja deh hehehe
Also called “port mapping,” port forwarding is directing traffic from the outside world to the appropriate server inside a local TCP/IP network (PCMag). Contoh kasus yang paling mudah adalah web server. Port default dari sebuah web server adalah 80, namun karena suatu alasan sehingga port tersebut dipindah ke port 9000. Disilah port forwarding berperan. Jika port forwarding tidak diatur, yang akan terjadi adalah user harus mengetik “http://domain.com:9000” agar dapat membuka website. Namun jika port forwarding online casino diatur, maka user hanya perlu mengetikkan “http://domain.com”. Untuk cara pengaturannya, ikuti cara dibawah ini
CTRL T
$ sudo su
# sysctl net.ipv4.ip_forward=1
# iptables -t nat -A PREROUTING -p tcp -i <interface> --dport <eksternal_port> -j DNAT --to-destination <ip_tujuan>:<internal_port>
# iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to-destination 192.168.1.1:9000
# iptables -t nat -A POSTROUTING -j MASQUERADE
Keterangan:
Untuk melihat apakah pengaturan kita telah tersimpan pada iptables atau belum, bisa dilakukan dengan mengetik
# iptables -t nat -L
Hasilnya akan seperti ini
Mungkin hanya ini yang dapat saya bagikan pada kesempatan hari ini.
Be Oprek-ers!! ^_^
NB: Terkadang salah peletakan interface membuat pengaturan tidak berhasil dilakukan
63 Comments
Tuesday
That’s a sharp way of thnniikg about it.
Xcho
As for port forwarding the port will be 25565-25565 or whtveaer you set it to, then the base host port will be the same as the port your opening ie 25565, and if you have a time out it should set itself. And do this for both TCP and UDP. I know this is a bit unclear but keep trying I’ve called various tech supports ISP and others for help with port forwarding but figured it out after quite some time trial and error.
ขายบ้าน
It’s an amazing post designed for all the web people; they will take advantage from it I am sure.
Post a Comment