Router ubuntu server 10.10

Network

Iseng iseng = ngoprek  linux + langgam keroncong  + camilan kacang

:/# nano /etc/network/interfaces

# The primary network interface

# ini ip dari internet

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet static

address 192.168.6.16

netmask 255.255.255.0

gateway 192.168.6.1

broadcast 192.168.6.255

network 192.168.6.0

# ini ip lokal

auto eth1

iface eth1 inet static

address 10.2.2.1

netmask 255.255.255.0

broadcast 10.2.2.255

network 10.2.2.0

:/# /etc/init.d/networking restart

:/# ip addr

:/# ifconfig

:/# ping google.com

:/# nano /etc/sysctl.conf

#net.ipv4.ip_forward=1        (hilangkan #)

simpan

:/#echo “1”>/proc/sys/net/ipv4/ip_forward

:/#/sbin/iptables -t nat -A POSTROUTING -s 10.2.2.0/255.255.255.0 -d 0/0 -j MASQUERADE

:/#nano /etc/rc.lokal

/sbin/iptables -t nat -A POSTROUTING -s 10.2.2.0/255.255.255.0 -d 0/0 -j MASQUERADE

exit 0

Untuk mengingatkan saja, semoga bermanfaat.

No Comments