Konfigurasi Router Linux

1. sudo su
2. ifconfig
3. nano /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0

iface eth0 inet static
address 192.168.1.6
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

auto eth1

iface eth1 inet static
address 192.168.2.9
netmask 255.255.255.0
network 192.168.2.0

4. /etc/init.d/networking restart

5. nano /etc/sysctl.conf
Hapus tanda "#":
- net.ipv4.default_filter=1
- net.ipv4.all.rp_filter=1
- net ipv4.ipforward=1
6. sysctl -p
7. iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
8. iptables -t nat -n –L
jika ada tulisan yang muncul "MASQUERADE all -- 0.0.0.0/0.0.0.0" tandanya berhasil
9. iptables-save > /etc/network/iptables (bagian ini hanya melihat saja)
10. nano /etc/network/iptables
11. nano /etc/init.d/rc.local
tambahkan kata-kata ini di bawah esac bagian paling bawah
iptables-restore < /etc/network/iptables
12. /etc/init.d/rc.local start
13. reboot
==============================
======================================= 
Konfigurasi Proxy Server

1. apt-get update
2. apt-get install squid
3. cp /etc/squid/squid.conf /etc/squid/squid.conf.backup
4. rm /etc/squid/squid.conf
5. nano /etc/squid/squid.conf
acl all src all
acl localnet src 192.168.0.0/24
acl situs url_regex -i "/etc/squid/blokir.txt"
http_access deny situs
http_access allow localnet
http_access allow all
http_port 3128 transparent
cache_mem 8 mb
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
store_dir_select_algorithm round robin
cache_dir aufs /cache 10000 24 256
cache_store_log none
cache_access_log /var/log/squid/access.log
cache_effective_user proxy
cache_effective_group proxy
visible_hostname proxy.www.proxyserver.sch.id
cache_mgr admin@smkvinama2.sch.id
6. nano /etc/squid/blokir.txt
www.facebook.com

www.youtube.com

7. mkdir /cache
8. chown -R proxy:proxy /etc/squid/blokir.txt
9. chown -R proxy:proxy /cache
10. service squid stop
11. squid -z
12. service squid start
13. iptables -t nat -I PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports
3128
14. iptables -t nat -I PREROUTING -i eth0 -p udp -m udp --dport 80 -j REDIRECT --to-ports
3128
15. iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j DNAT --to-destination
192.168.1.6:3128
16. iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports
3128
17. iptables-save > /etc/network/iptables 
 
Setting Connection Client
1. Klik Start
2. pilih control panel > Network And Internet Connection > Network Connection

3. klik kanan icon Local Area Connection, pilih properties
4. Pilih Internet Protocol (TCP/IP)
5. klik properties
6. pilih Use the following IP Address
7. Ip Address : 192.168.2.10
8. Subnet Mask: 255.255.255.0
9. Gateway : 192.168.2.9
10. DNS Preferred: 192.168.1.6
11. DNS Alternate : 192.168.1.1

Leave a Reply

Subscribe to Posts | Subscribe to Comments

- Copyright © - TeKaJe DotCom - Powered by Blogger - Designed by Tekaje Dotcom -