STEP BY STEP SETTING 3G MULTIWAN DI OPENWRT
by Obengkumana
PERALATAN TEMPUR
- ROUTER YG ANE GUNAKAN ADALAH
HUAWEI HG553
- MODEM YG ANE GUNAKAN ADALAH
VODAFONE/HUAWEI K3715 &
HUAWEI E153
- KARTU YG DIGUNAKAN KEDUANYA T******EL F***H
- USB HUB abal2 kisran harga 10-15rb
(kabel sudah diganti untuk menghindari daya yg kurang pada USB HUB, sehingga tidak perlu mempergunakan adaptor untuk menambah daya di USB HUB
)
ane yakin bs juga di terapkan pada semua roter dengan syarat
1. firmware yg digunakan
openwrt
2. ada slot USB dengan USB HUB
3. 2 modem bs langsung terdeteksi dengan baik tanpa perintah tambahan.
langsung aja ya tanpa basa basi
PERSIAPAN
- back up dulu firmware/config yg ada sekarang, menghindari gagal setting
- makanan ringan dan air secukupnya
- jika anda seorang
AHLI HISAP , pesiapkan min 2 bungkus dan segelas kopi hangat untuk melunturkan nikotin
TAHAP PERTAMA
ruba file di
/etc/confg/network menjadi
Quote:
Spoiler for network :
config interface 'loopback'
\toption ifname 'lo'
\toption proto 'static'
\toption ipaddr '127.0.0.1'
\toption netmask '255.0.0.0'
config interface 'lan'
\toption type 'bridge'
\toption ifname 'eth1'
\toption proto 'static'
\toption ipaddr '192.168.1.1'
\toption netmask '255.255.255.0'
config interface 'wan'
\toption proto '3g'
\toption service 'umts'
\toption apn 'internet'
\toption username ' '
\toption password ' '
\toption device '/dev/ttyUSB0'
\toption defaultroute '0'
\toption maxwait '20'
config interface 'wan2'
\toption proto '3g'
\toption device '/dev/ttyUSB4'
\toption service 'umts'
\toption apn 'internet'
\toption username ' '
\toption password ' '
\toption defaultroute '0'
\toption maxwait '10'
config 'switch'
\toption 'name' 'rtl8366s'
\toption 'reset' '1'
\toption 'enable_vlan' '1'
\toption 'blinkrate' '2'
config 'switch_vlan'
\toption 'device' 'rtl8366s'
\toption 'vlan' '1'
\toption 'ports' '0 1 2 3 5t'
config 'switch_port'
\toption 'device' 'rtl8366s'
\toption 'port' '1'
\toption 'led' '6'
config 'switch_port'
\toption 'device' 'rtl8366s'
\toption 'port' '2'
config 'switch_port'
\toption 'device' 'rtl8366s'
\toption 'port' '5'
TAHAP KEDUA
rubah file
/etc/config/multiwan menjadi:
Quote:
Spoiler for multiwan :
config 'multiwan' 'config'
\toption 'health_monitor' 'serial'
\toption 'default_route' 'fastbalancer'
\toption 'debug' '1'
config 'interface' 'wan'
\toption 'health_fail_retries' '3'
\toption 'health_recovery_retries' '5'
\toption 'failover_to' 'fastbalancer'
\toption 'timeout' '10'
\toption 'dns' '8.8.8.8 8.8.4.4'
\toption 'weight' '10'
\toption 'health_interval' '120'
\toption 'icmp_hosts' 'gateway'
config 'interface' 'wan2'
\toption 'timeout' '3'
\toption 'health_fail_retries' '3'
\toption 'health_recovery_retries' '5'
\toption 'failover_to' 'fastbalancer'
\toption 'dns' '208.67.222.222 208.67.220.220'
\toption 'weight' '10'
\toption 'health_interval' '120'
\toption 'icmp_hosts' 'gateway'
config 'mwanfw'
\toption 'src' '192.168.1.150'
\toption 'wanrule' 'fastbalancer'
config 'mwanfw'
\toption 'wanrule' 'fastbalancer'
TAHAP KETIGA
rubah file
/etc/config/firewall menjadi:
Quote:
Spoiler for firewall :
config 'defaults'
\toption 'syn_flood' '1'
\toption 'input' 'ACCEPT'
\toption 'output' 'ACCEPT'
\toption 'forward' 'REJECT'
\toption 'drop_invalid' '1'
config 'zone'
\toption 'name' 'lan'
\toption 'network' 'lan'
\toption 'input' 'ACCEPT'
\toption 'output' 'ACCEPT'
\toption 'forward' 'REJECT'
config 'zone'
\toption 'name' 'wan'
\toption 'input' 'REJECT'
\toption 'output' 'ACCEPT'
\toption 'forward' 'REJECT'
\toption 'masq' '1'
\toption 'mtu_fix' '1'
\toption 'network' 'wan'
config 'rule'
\toption 'src' 'wan'
\toption 'proto' 'udp'
\toption 'dest_port' '68'
\toption 'target' 'ACCEPT'
\toption 'family' 'ipv4'
config 'rule'
\toption 'src' 'wan'
\toption 'proto' 'icmp'
\toption 'icmp_type' 'echo-request'
\toption 'family' 'ipv4'
\toption 'target' 'ACCEPT'
config 'rule'
\toption 'src' 'wan'
\toption 'proto' 'icmp'
\tlist 'icmp_type' 'echo-request'
\tlist 'icmp_type' 'destination-unreachable'
\tlist 'icmp_type' 'packet-too-big'
\tlist 'icmp_type' 'time-exceeded'
\tlist 'icmp_type' 'bad-header'
\tlist 'icmp_type' 'unknown-header-type'
\tlist 'icmp_type' 'router-solicitation'
\tlist 'icmp_type' 'neighbour-solicitation'
\toption 'limit' '1000/sec'
\toption 'family' 'ipv6'
\toption 'target' 'ACCEPT'
config 'rule'
\toption 'src' 'wan'
\toption 'dest' '*'
\toption 'proto' 'icmp'
\tlist 'icmp_type' 'echo-request'
\tlist 'icmp_type' 'destination-unreachable'
\tlist 'icmp_type' 'packet-too-big'
\tlist 'icmp_type' 'time-exceeded'
\tlist 'icmp_type' 'bad-header'
\tlist 'icmp_type' 'unknown-header-type'
\toption 'limit' '1000/sec'
\toption 'family' 'ipv6'
\toption 'target' 'ACCEPT'
config 'include'
\toption 'path' '/etc/firewall.user'
config 'forwarding'
\toption 'dest' 'wan'
\toption 'src' 'lan'
config 'rule'
\toption 'target' 'ACCEPT'
config 'zone'
\toption 'name' 'wan2'
\toption 'forward' 'REJECT'
\toption 'output' 'ACCEPT'
\toption 'network' 'wan2'
\toption 'input' 'REJECT'
\toption 'masq' '1'
\toption 'mtu_fix' '1'
config 'forwarding'
\toption 'dest' 'wan2'
\toption 'src' 'lan'
TAHAP KE EMPAT
rubah file
/etc/config/dhcp
Quote:
Spoiler for dhcp :
config dnsmasq
\toption domainneeded '1'
\toption boguspriv '1'
\toption filterwin2k '0'
\toption localise_queries '1'
\toption rebind_protection '1'
\toption rebind_localhost '1'
\toption local '/lan/'
\toption domain 'lan'
\toption expandhosts '1'
\toption nonegcache '0'
\toption authoritative '1'
\toption readethers '1'
\toption leasefile '/tmp/dhcp.leases'
\toption resolvfile '/tmp/resolv.conf.auto'
config dhcp 'lan'
\toption interface 'lan'
\toption start '100'
\toption limit '150'
\toption leasetime '12h'
\tlist dhcp_option '6,208.67.222.222,208.67.220.220'
config dhcp 'wan'
\toption interface 'wan'
\toption ignore '1'
TAHAP KE LIMA
masuk ke
"putty"
- Buat file, dengan perintah:
Quote:
# touch /bin/tester.sh
# chmod 755 /bin/tester.sh
- copas tulisan di bawah ini ke dalam file
/bin/tester.sh
Quote:
Spoiler for tester.sh :
#!/bin/sh
if ! ping -q -c 1 -W 10 -I 3g-wan 8.8.8.8 > /dev/null; then
(ifup wan; sleep 5; /etc/init.d/multiwan restart) &
fi
if ! ping -q -c 1 -W 10 -I 3g-wan2 8.8.8.8 > /dev/null; then
(ifup wan2; sleep 5; /etc/init.d/multiwan restart) &
fi
kembali masuk ke
"putty"
- ketik perintah:
Quote:
# /etc/init.d/cron stop
# echo "*/2 * * * * /bin/tester.sh" >> /etc/crontabs/root
# /etc/init.d/cron enable
# /etc/init.d/cron start
SELESAI...............
* silahkan ubah config di atas sesuaikan dengan jenis roter, ISP yg dpergunakan dan posisi terdeteksinya modem di router