Ubuntu sebagai gateway internet

Aktifin root

# sudo passwd —enter (masukin pass sekarang, buat pass baru untuk root)
# su — enter (masukin pass root)

seting ip address, gunakan program editing kesayangan anda, disini saya pakai pico

root@ubuntu:~# pico /etc/network/interfaces

# The loopback network interface
auto lo
iface lo inet loopback

# Ethernet dari ISP
auto eth0
iface eth0 inet static
address 192.168.1.254
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.1.1

# Ethernet LAN (gateway)
auto eth1
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0

Restart network

root@ubuntu:~# /etc/init.d/networking restart
* Reconfiguring network interfaces… [ OK ]

Lihat hasil dari configurasi ip address

root@ubuntu:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0c:29:c9:2f:37
inet addr:192.168.1.254 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fec9:2f37/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:882 errors:0 dropped:0 overruns:0 frame:0
TX packets:314 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:95253 (93.0 KB) TX bytes:36154 (35.3 KB)
Interrupt:17 Base address:0×1400

eth1 Link encap:Ethernet HWaddr 00:0c:29:c9:2f:41
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fec9:2f41/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1378 (1.3 KB) TX bytes:328 (328.0 B)
Interrupt:18 Base address:0×1480

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
———————————————–

test ping ke geteway isp

root@ubuntu:~# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=0.655 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.348 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.335 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.360 ms

ok. selesai

Di comot dari suatu blog ( lupa namanya), mohon kepada yang punya blog untuk kerelaannya di copy paste. dan di sebarkan kembali. semoga bermanfaat bagi saya, anda dan orang lain. bagi2 ilmu (yang baik2) adalah perbuatan mulia

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.