Code Monkey home page Code Monkey logo

jarkom-modul-5-e02-2022's Introduction

Laporan Resmi Praktikum Jaringan Komputer Modul 5

Anggota Kelompok

  • 5025201248 - Fajar Zuhri Hadiyanto
  • 5025201047 - Sidrotul Munawaroh

A (Topologi)

A

B (Subnetting)

Subnetting menggunakan VLSM B

C (Routing)

Routing pada Strix

C1

Routing Pada Westalis

C2

Routing Pada Ostanis

C3

D (Dynamic IP)

Konfigurasi DHCP Server

Pada server WISE yang berperan sebagai DHCP server, lakukan instalasi dhcp server dengan perintah apt-get update, lalu apt-get install isc-dhcp-server -y. Setelah itu, buka file /etc/default/isc-dhcp-server, lalu masukkan line berikut

INTERFACES="eth0"

lalu buka file /etc/dhcp/dhcpd.conf, lalu tambahkan line berikut

subnet 192.193.0.0 netmask 255.255.252.0 {
    range 192.193.0.2 192.193.3.254;
    option routers 192.193.0.1;
    option broadcast-address 192.193.3.255;
    option domain-name-servers 192.193.7.131;
    default-lease-time 300;
    max-lease-time 6900;
}

subnet 192.193.4.0 netmask 255.255.254.0 {
    range 192.193.4.2 192.193.5.254;
    option routers 192.193.4.1;
    option broadcast-address 192.193.5.255;
    option domain-name-servers 192.193.7.131;
    default-lease-time 300;
    max-lease-time 6900;
}

subnet 192.193.6.0 netmask 255.255.255.0 {
    range 192.193.6.2 192.193.6.254;
    option routers 192.193.6.1;
    option broadcast-address 192.193.6.255;
    option domain-name-servers 192.193.7.131;
    default-lease-time 300;
    max-lease-time 6900;
}

subnet 192.193.7.0 netmask 255.255.255.128 {
    range 192.193.7.2 192.193.7.126;
    option routers 192.193.7.1;
    option broadcast-address 192.193.7.127;
    option domain-name-servers 192.193.7.131;
    default-lease-time 300;
    max-lease-time 6900;
}

subnet 192.193.7.128 netmask 255.255.255.248 {
}

subnet 192.193.7.144 netmask 255.255.255.252 {
}

subnet 192.193.7.148 netmask 255.255.255.252 {
}

lalu, lakukan restart dhcp server dengan perintah service isc-dhcp-server restart

Konfigurasi DHCP Relay

Untuk setiap router yang berperan sebagai DHCP relay (dalam hal ini yaitu semua router), lakukan instalasi dhcp relay dengan perintah apt-get update, lalu apt-get install isc-dhcp-relay, untuk opsi2 yang diminta, kosongkan saja terlebih dahulu. Setelah itu buka file /etc/default/isc-dhcp-relay, lalu tambahkan line berikut

SERVERS="192.193.7.130"
INTERFACES="eth1 eth2"
OPTIONS=""

Setelah itu, restart dhcp relay dengan perintah service isc-dhcp-relay restart

Konfigurasi IP Client

Pada client, lakukan konfigurasi ip sebagai berikut

auto eth0
iface eth0 inet dhcp

Setelah itu, restart client.

Nomor 1 (Mengakses Internet keluar tanpa MASQUERADE)

gunakan postrouting pada nat table dengan jump ke SNAT, lalu ubah source addressnya menjadi address dari router pada interface yang terhubung ke nat (dalam kasus ini yaitu eth0) menggunakan perintah iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source 192.168.122.10

1

Nomor 2 (Blok semua tcp dan udp dari luar jaringan)

Gunakan perintah sebagai berikut

iptables -A INPUT -m iprange --src-range 192.193.0.0-192.193.7.151 -j ACCEPT
iptables -A INPUT -p tcp --syn -j DROP
iptables -A INPUT -p udp -j DROP

image

Noomor 3 (Pembatasan ICMP pada DNS dan DHCP Server)

Gunakan perintah sebagai berikut pada DNS dan DHCP Server iptables -A INPUT -p icmp -m conntrack --ctstate NEW -m connlimit --connlimit-mask 21 --connlimit-above 2 -j DROP

Nomor 4 (Akses Web Server berdasarkan Waktu)

Lakukan instalasi Web Server pada server Garden dan SSS (tidak akan dijelaskan disini). Pada router Ostania (yang terdekat dengan kedua server tsb), tambahkan rule sebagai berikut

iptables -A FORWARD -p tcp -d 192.193.7.138,192.193.7.139 -m multiport --dport 80,443 -m time --timestart 07:00 --timestop 16:00 --weekdays Mon,Tue,Wed,Thu,Fri -j ACCEPT
iptables -A FORWARD -p tcp -d 192.193.7.138,192.193.7.139 -m multiport --dport 80,443 -j DROP

Hasil pengujian pada Work hour 4a

Hasil pengujian pada Weekdays non work hour 4b

Hasil pengujian pada Weekend 4c

Nomor 5 (Load Balancing Garden port 80 dan SSS port 443)

Pada router ostania (router terdekat dengan kedua web server tsb), tambahkan rule sebagai berikut

iptables -A PREROUTING -t nat -p tcp -d 192.193.7.138 --dport 80 -m  state --state NEW -m statistic --mode nth --every 2 --packet 0 -j DNAT --to-destination 192.193.7.138
iptables -A PREROUTING -t nat -p tcp -d 192.193.7.138 --dport 80 -m  state --state NEW -j DNAT --to-destination 192.193.7.139

iptables -A PREROUTING -t nat -p tcp -d 192.193.7.139 --dport 443 -m  state --state NEW -m statistic --mode nth --every 2 --packet 0 -j DNAT --to-destination 192.193.7.138
iptables -A PREROUTING -t nat -p tcp -d 192.193.7.139 --dport 443 -m  state --state NEW -j DNAT --to-destination 192.193.7.139

Hasil pengujian load balancing Garden Port 80 5a

Hasil pengujian load balancing SSS Port 443 5b

Nomor 6 (Logging)

Untuk setiap node yang menerapkan dropping rule, Tambahkan Chain baru dengan perintah sebagai berikut

iptables -N LOG_DROP
iptables -A LOG_DROP -j LOG --log-prefix "IPTABLES:DROP: " --log-level 4
iptables -A LOG_DROP -j DROP

lalu untuk setiap rule yang jump ke DROP, ganti dengan chain yang baru dibuat yaitu LOG DROP

jarkom-modul-5-e02-2022's People

Contributors

fajarzuhrihadiyanto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.