Академический Документы
Профессиональный Документы
Культура Документы
# gedit /etc/network/interfaces
Edit seperti script di bawah ini :
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interfaces
allow-hotplug eth0
iface eth0 inet dhcp
# The secondary (LAN) network interface
auto eth1
iface eth1 inet static
address 192.168.100.1
netmask 255.255.255.0
Di save dan exit
Kemudian ketik :
#ifconfig
root@debian:/home/smkn3psp# ifconfig
eth0
Link encap:Ethernet HWaddr 00:e0:4c:73:00:fc
inet addr:192.168.2.100 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::2e0:4cff:fe73:fc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:126 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1300 (1.2 KiB) TX bytes:17922 (17.5 KiB)
Interrupt:42 Base address:0xe000
eth1
#iptables -t nat -n -L
root@debian:/home/smkn3psp# iptables -t nat -n -L
Chain PREROUTING (policy ACCEPT)
target prot opt source
destination
Chain INPUT (policy ACCEPT)
target prot opt source
destination
Chain OUTPUT (policy ACCEPT)
target prot opt source
destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source
destination
MASQUERADE all -- 0.0.0.0/0
0.0.0.0/0
Saatnya menguji di Client (Windows). Sesuaikan dengan konfigurasi di bawah ini
Selesai untuk setting IP Address dan eth0 dan eth1 sudah saling berhubungan
@
@
@
root
mail
www
IN
IN
IN
IN
IN
IN
NS
A
MX
A
A
CNAME
root.smkn3psp.sch.id.
192.168.2.100
1 mail.smkn3psp.sch.id.
192.168.2.100
192.168.2.100
root
192.168.2.100
192.168.2.100#53
Name: smkn3psp.sch.id
Address: 192.168.2.100
# nslookup www.smkn3psp.sch.id
Server:
Address:
192.168.2.100
192.168.2.100#53
www.smkn3psp.sch.id
Name: root.smkn3psp.sch.id
Address: 192.168.2.100
# nslookup 192.168.2.100
Server:192.168.2.100
Address:
192.168.2.100#53
100.2.168.192.in-addr.arpa
100.2.168.192.in-addr.arpa
name = root.smkn3psp.sch.id.
name = mail.smkn3psp.sch.id.
Apabila tampil seperti diatas berarti anda berhasil membuat sebuah DNS server
Tidak ada titik atau spasi ataupun yang lainnya hasil konfigurasi bisa salah atau gagal
10. Jika sudah,supaya squid menjadi transparent kita perlu membelokkan semua akses dari
client yang menuju port 80 (http) menuju port squid (3128) dengan mengunakan iptables,
perintahnya sebagai berikut:
#iptables -t nat -A PREROUTING -p tcp -i eth1 -s 192.168.100.0/26 --dport 80 -j REDIRECT
--to-port 3128
untuk melihat hasil konfigurasi iptables,gunakan perintah berikut :
iptables -t nat -nL
root@debian:/etc/squid# iptables -t nat -nL
Chain PREROUTING (policy ACCEPT)
target prot opt source
destination
REDIRECT tcp -- 192.168.100.0/26 0.0.0.0/0