Skrip Debian New
Skrip Debian New
Skrip Debian New
1. nano /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
auto eth1
iface eth1 inet static
address 192.168.10.1
netmask 255.255.255.0
2. nano /etc/rc.local
iptables -A POSTROUTING -t nat -o eth0 -j MASQUERADE
3. nano /etc/network/option
ip_forward = yes
spoofprotect = yes
syncookies = no
4. nano /etc/sysctl.conf
cari kata #net.ipv4.ip_forward=1
kemudian hilangkan tanda #
5. /etc/init.d/networking restart
6. reboot
7. ping 192.168.1.2
8. ping 192.168.10.1
7. nano /var/cache/bind/db.192
@ IN SOA smkn2binjai.sch.id. root.smkn2binjai.sch.id. (
@ IN NS smkn2binjai.sch.id.
1.10.168 IN PTR smkn2binjai.sch.id.
8. nano /etc/resolv.conf
search smkn2binjai.sch.id
nameserver 192.168.10.1
nameserver 8.8.8.8
nameserver 8.8.4.4
9. /etc/init.d/bind9 restart
10. nslookup 192.168.10.1
11. nslookup smkn2binjai.sch.id
#. . .
# pool.ntp.org maps to about 1000 low-stratum NTP servers. Your server will
# pick a different set every time it starts up. Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
#server 0.debian.pool.ntp.org iburst
#server 1.debian.pool.ntp.org iburst
#server 2.debian.pool.ntp.org iburst
#server 3.debian.pool.ntp.org iburst
server 127.127.1.0
fudge 127.127.1.0 stratum 1
#. . . #. . .
# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
restrict 192.168.10.0
mask 255.255.255.0 nomodify notrap
#...
3. /etc/init.d/ntp restart
4. ntpq -p
KONFIGURASI FIREWALL
Buka kembalai nano /etc/rc.local. Tambahkan sebelum exit 0
#blok port SSH
iptables A INPUT p tcp dport 22 j DROP
#Blok port TELNET
iptables A INPUT p tcp dport 23 j DROP