[ASK]Routing NAT pake modem USB

Diskusi tentang Ubuntu Server baik webserver, database server, samba server dan service lainnya serta jaringan menggunakan Sistem Operasi Ubuntu.
User avatar
rizaaal
Posts: 1212
Joined: 01 May 2011, 16:02
Location: Bekasi, Indonesia
Contact:

[ASK]Routing NAT pake modem USB

Postby rizaaal » 17 Aug 2012, 21:40

Masbro masbro, saya kan sering make Ubuntu & Debian buat dijadiin Router. Nah biasanya saya kan make perintah iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE buat perintah routing NATnya.

Nah, kalo seandainya sumber internetnya pake modem USB bukan pake kabel, apakah perintah routingnya masih sama kayak gitu atau ada perintah lain?

soalnya saya pernah make perintah : iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE gabisa.

mohon pencerahannya :)
User avatar
thrvers
Posts: 4458
Joined: 01 Jan 2010, 13:28
Location: Jombang, Indonesia
Contact:

Re: [ASK]Routing NAT pake modem USB

Postby thrvers » 18 Aug 2012, 01:37

'
    konek ke ppp0 dulu
  • iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
  • echo 1 > /proc/sys/net/ipv4/ip_forward
  • di /etc/sysctl.conf ditambahi baris:
    net.ipv4.conf.default.forwarding = 1
    net.ipv4.conf.all.forwarding = 1

  • misal dishare ke LAN maka perlu set IP (eth0) dan netmask saja (tanpa gateway) + dhcp-server
cmiiw
Last edited by thrvers on 27 Feb 2016, 20:50, edited 1 time in total.
Reason: nambah: konek ppp0
User avatar
rizaaal
Posts: 1212
Joined: 01 May 2011, 16:02
Location: Bekasi, Indonesia
Contact:

Re: [ASK]Routing NAT pake modem USB

Postby rizaaal » 18 Aug 2012, 16:30

dicoba dulu masbro, tengkyu :)

Return to “Ubuntu Server”

Who is online

Users browsing this forum: No registered users and 6 guests