sharing internet ip forwarding iptables

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
NEW_BIE

sharing internet ip forwarding iptables

Post 14 Jun 2012, 19:26

om om yang udah mastah, saya mau tanya kalo ip forwarding sharing internet pake iptables gimana caranya ya? saya pake ubuntu 11.04.
eth0 (internet) = 192.168.0.23
eth1 (LAN ke client) = 192.168.5.1
saya udah konfigurasi sysctl.conf (net.ipv4.ip_forward=1).
saya jg udah sempet coba pake
iptables -t NAT -A POSTROUTING -o eth0 MASQUERADE
malah keluar warning
"cant initialize iptables table NAT. table does not exist...."
saya baru pertama pake ubuntu tolong yaa,makasih sebelumnya. :grin:
User avatar
yudiarbi
Contact:

Post 16 Jun 2012, 09:45

kalo modemnya mode bridge :

Code: Select all

iptables -t NAT -A POSTROUTING -o ppp0 -j MASQUERADE 
kalo mode pppoe

Code: Select all

iptables -t NAT -A POSTROUTING -o eth0 -j MASQUERADE 
User avatar
sayed
Contact:

Post 12 Jul 2012, 23:17

klo masquerading tu interface ke internet ya???

klo misal ga pake option network interfacenya kira2 bisa jalan ga masquerade nya?
User avatar
agungmitnick
Contact:

Post 13 Jul 2012, 15:09

coba pake ini deh
# echo 1 > /proc/sys/net/ipv4/ip_forward
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

bisa gak bisanya kabarin ya hehe :D
User avatar
semut
Contact:

Post 13 Jul 2012, 22:57

yudiarbi wrote:kalo modemnya mode bridge :

Code: Select all

iptables -t NAT -A POSTROUTING -o ppp0 -j MASQUERADE 
kalo mode pppoe

Code: Select all

iptables -t NAT -A POSTROUTING -o eth0 -j MASQUERADE 
kyk'e kebalik nih om..
User avatar
agus_sintang
Contact:

Post 14 Jul 2012, 05:04

semut wrote:
yudiarbi wrote:kalo modemnya mode bridge :

Code: Select all

iptables -t NAT -A POSTROUTING -o ppp0 -j MASQUERADE 
kalo mode pppoe

Code: Select all

iptables -t NAT -A POSTROUTING -o eth0 -j MASQUERADE 
kyk'e kebalik nih om..

hehe, iya ada yang kebalik nih kayaknya,
User avatar
sayed
Contact:

Post 16 Jul 2012, 23:06

NEW_BIE wrote: iptables -t NAT -A POSTROUTING -o eth0 MASQUERADE
"cant initialize iptables table NAT. table does not exist...."
itu masalahnya cuma text "NAT" harus huruf kecil jd "nat"

iptables -t nat -A POSTROUTING -o (interface yang terhubung ke internet) -j MASQUERADE
Post Reply Previous topicNext topic

Who is online

Users browsing this forum: No registered users and 80 guests