Difference between revisions of "OpenWRT: Setup OLSR di UBNT via CLI"

From OnnoWiki
Jump to navigation Jump to search
 
(12 intermediate revisions by the same user not shown)
Line 98: Line 98:
 
==Setup NAT melalui MESH==
 
==Setup NAT melalui MESH==
  
Edit
+
Sebaiknya buat setup Firewall
  
  vi /etc/config/firewall
+
  rm /etc/config/firewall
  
Isi kira-kira
+
Buat [[NAT]] di /etc/rc.local saja
  
config defaults
+
==Set agar [[NAT]] dan [[OLSR]] start waktu booting==
option syn_flood '1'
 
option input 'ACCEPT'
 
option output 'ACCEPT'
 
option forward 'REJECT'
 
 
config zone
 
option name 'lan'
 
option network 'lan'
 
option input 'ACCEPT'
 
option output 'ACCEPT'
 
option forward 'REJECT'
 
 
config zone
 
option name 'MESH'
 
option input 'ACCEPT'
 
option forward 'REJECT'
 
option output 'ACCEPT'
 
option network 'MESH'
 
option masq '1'
 
option mtu_fix '1'
 
 
config forwarding
 
option src 'lan'
 
option dest 'MESH'
 
 
 
Edit / ubah semua 'wan' menjadi 'MESH'
 
 
 
==Set agar OLSR start waktu booting==
 
  
 
Edit rc.local
 
Edit rc.local
Line 141: Line 113:
  
 
  ifconfig wlan0 10.123.123.223 netmask 255.0.0.0 '''(IP ADDRESS sama dengan IP addres di /etc/config/network  di ATAS)'''
 
  ifconfig wlan0 10.123.123.223 netmask 255.0.0.0 '''(IP ADDRESS sama dengan IP addres di /etc/config/network  di ATAS)'''
 +
echo 1 > /proc/sys/net/ipv4/ip_forward
 +
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
 
  /etc/init.d/telnet stop
 
  /etc/init.d/telnet stop
 
  /etc/init.d/olsrd stop
 
  /etc/init.d/olsrd stop
Line 146: Line 120:
 
   
 
   
 
  exit 0
 
  exit 0
 +
 +
 +
Nampaknya [[NAT]] sebaiknya di aktifkan di rc.local.
 +
Semua setting /etc/config/firewall di matikan agar [[OLSR]] tidak rewel.
  
 
==Buat file /etc/olsrd.conf==
 
==Buat file /etc/olsrd.conf==
Line 155: Line 133:
 
Isi dengan
 
Isi dengan
  
 +
# DebugLevel 0
 +
# AllowNoInt yes
 +
# IpVersion 4
 +
# RtTable 111
 +
# RtTableDefault 112
 +
 
  Hna4
 
  Hna4
 
  {
 
  {
Line 163: Line 147:
 
  Hna6
 
  Hna6
 
  {
 
  {
  }
+
  }  
 
   
 
   
  LoadPlugin "olsrd_nameservice.so.0.3"
+
  LoadPlugin "olsrd_arprefresh.so.0.1"
 
  {
 
  {
 
  }
 
  }
 
   
 
   
  LoadPlugin "olsrd_txtinfo.so.0.1"
+
  LoadPlugin "olsrd_nameservice.so.0.3"
{
 
    PlParam "accept" "0.0.0.0"
 
}
 
 
InterfaceDefaults
 
 
  {
 
  {
 +
        '''PlParam "name" "NAMA-NODE-Mesh-ini"'''
 +
        PlParam "latlon-file" "/var/run/latlon.js"
 +
        PlParam "hosts-file" "/var/etc/hosts.olsr"
 +
        PlParam "sighup-pid-file" "/var/run/dnsmasq.pid"
 +
        PlParam "services-file" "/var/run/services_olsr"
 +
        PlParam "suffix" ".olsr"
 
  }
 
  }
 
   
 
   
  Interface "wlan0"
+
LoadPlugin "olsrd_txtinfo.so.0.1" 
 +
{                                   
 +
        PlParam "accept" "0.0.0.0" 
 +
}                                   
 +
                                                 
 +
LoadPlugin "olsrd_watchdog.so.0.1"               
 +
{                                                     
 +
        PlParam "file" "/var/run/olsrd.watchdog"       
 +
        PlParam "interval" "30"                       
 +
}                                                     
 +
                                                       
 +
LoadPlugin "olsrd_jsoninfo.so.0.0"                     
 +
{                                                     
 +
}                                                     
 +
                                 
 +
InterfaceDefaults               
 +
{                               
 +
        Ip4Broadcast 255.255.255.255
 +
}                                             
 +
                                               
 +
  Interface "wlan0"                              
 
  {
 
  {
    Mode "mesh"
+
        mode mesh
  }
+
  }  
  
  
 +
Daftar lengkap olsrd plugin yang ada bisa dilihat di
  
 +
/usr/lib
  
 
==Pranala Menarik==
 
==Pranala Menarik==
Line 192: Line 199:
 
* [[OpenWRT: Source Repository Download]]
 
* [[OpenWRT: Source Repository Download]]
 
* [[OpenWRT: Melihat Daftar Package]]
 
* [[OpenWRT: Melihat Daftar Package]]
 +
* [[OpenWRT: Mengembalikan setting default Config.in]]
  
 
===Build Firmware===
 
===Build Firmware===
Line 210: Line 218:
 
* [[OpenWRT: Build Firmware Linksys WRT160NL]]
 
* [[OpenWRT: Build Firmware Linksys WRT160NL]]
 
* [[OpenWRT: Build Firmware Linksys WRT54GL]]
 
* [[OpenWRT: Build Firmware Linksys WRT54GL]]
* [[OpenWRT: Build Firmware Mikrotik RB433]]
 
  
 
===APRX===
 
===APRX===
Line 216: Line 223:
  
 
* [[OpenWRT: Build Firmware Buffalo WZRHPG300NH2 untuk APRX]]
 
* [[OpenWRT: Build Firmware Buffalo WZRHPG300NH2 untuk APRX]]
 +
* [[OpenWRT: Setup APRX]]
  
 
===IPv6===
 
===IPv6===
Line 238: Line 246:
 
* [[OpenWRT: Flash UBNT NanoStation Loco M2]]
 
* [[OpenWRT: Flash UBNT NanoStation Loco M2]]
 
* [[OpenWRT: Flash UBNT Bullet M2]] '''RECOMMENDED'''
 
* [[OpenWRT: Flash UBNT Bullet M2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Mikrotik RB433]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Mikrotik RB450]]
  
 
===Misc===
 
===Misc===
  
 +
* [[OpenWRT: CLI]]
 
* [[OpenWRT: Setup WiFi]]
 
* [[OpenWRT: Setup WiFi]]
 
* [[OpenWRT: Setup PPTP VPN Server]]
 
* [[OpenWRT: Setup PPTP VPN Server]]
 
* [[OpenWRT: Setup OLSR di UBNT via CLI]] '''RECOMMENDED'''
 
* [[OpenWRT: Setup OLSR di UBNT via CLI]] '''RECOMMENDED'''
* [[OpenWRT: Mikrotik RB433]]
+
* [[OpenWRT: Mikrotik RB433]] '''RECOMMENDED'''
 
* [[OpenWRT: Setup OLSR Sederhana]]
 
* [[OpenWRT: Setup OLSR Sederhana]]
 +
* [[OpenWRT: Setup OLSR via Web]] '''RECOMMENDED'''
 
* [[OLSR - di OpenWRT]]
 
* [[OLSR - di OpenWRT]]
 
* [[OpenWRT: 3G modem]]
 
* [[OpenWRT: 3G modem]]
Line 251: Line 263:
 
* [[OpenWRT: Setup Firewall]]
 
* [[OpenWRT: Setup Firewall]]
 
* [[OpenWRT: Konfigurasi UBNT NanoStation2 tanpa WebGUI]]
 
* [[OpenWRT: Konfigurasi UBNT NanoStation2 tanpa WebGUI]]
 +
* [[OpenWRT: OLSR nameservice plugin]]
 +
* [[OpenWRT: VLAN]]
  
 
===UBNT===
 
===UBNT===
Line 258: Line 272:
 
* [[UBNT: Upload Firmware]]
 
* [[UBNT: Upload Firmware]]
 
* [[UBNT: Rebuild Firmware]]
 
* [[UBNT: Rebuild Firmware]]
* [[UBNT: firmware dengan OLSR]]
+
* [[UBNT: firmware dengan OLSR]]25
 
* [[UBNT: openwrt]]
 
* [[UBNT: openwrt]]
 
* [[UBNT: olsr dengan openwrt]]
 
* [[UBNT: olsr dengan openwrt]]
 
* [[UBNT: olsr dengan kamikaze openwrt]]
 
* [[UBNT: olsr dengan kamikaze openwrt]]
* [[UBNT: olsr dengan backfire openwrt]] '''RECOMMENDED'''
+
* [[UBNT: olsr dengan backfire openwrt]]
 
* [[UBNT: UniFi]]
 
* [[UBNT: UniFi]]
 
* [[UBNT: UniFi Konfigurasi Awal]]
 
* [[UBNT: UniFi Konfigurasi Awal]]

Latest revision as of 05:54, 27 February 2014

Reset Password Root

Reset password root melalui telnet ke 192.168.1.1

telnet 192.168.1.1

Tampilan

Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
 === IMPORTANT ============================
  Use 'passwd' to set your login password
  this will disable telnet and enable SSH
 ------------------------------------------


BusyBox v1.19.4 (2013-04-10 18:38:45 WIT) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r36235)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------

root@OpenWrt:/# passwd
Changing password for root
New password:
Retype password:
Password for root changed by root

Konfigurasi Wireless

Konfigurasi wireless dan mengaktifkan sebagai adhoc pada channel 1.

vi /etc/config/wireless

Isinya kira-kira

config wifi-device  radio0
        option type     mac80211
        option channel  1
        option hwmode   11g
        txpower         15
        option path     'platform/ar231x-wmac.0'  # option path berbeda untuk NS2 NSM2 Bullet dll

        # REMOVE THIS LINE TO ENABLE WIFI:
        option disabled 0

config wifi-iface
        option device   radio0
        option network  MESH
        option mode     adhoc
        option ssid     MESH
        option encryption none
        option bssid    02:CA:FF:EE:BA:BE


Konfigurasi IP address MESH

Set IP statik melalui perintah

vi /etc/config/network

Isi kira-kira

config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0 

config interface lan
        option ifname   eth0
        option type     bridge
        option proto    static
        option ipaddr   192.168.1.1
        option netmask  255.255.255.0

# konfigurasi berikut penting untuk MESH
#
config interface 'MESH'
	option _orig_ifname 'wlan0'
	option _orig_bridge 'false'
	option proto 'static'
       option ipaddr   10.123.123.223 # (SETIAP NODE HARUS menggunakan IP yang BEDA!!)
       option netmask  255.0.0.0

Setup NAT melalui MESH

Sebaiknya buat setup Firewall

rm /etc/config/firewall

Buat NAT di /etc/rc.local saja

Set agar NAT dan OLSR start waktu booting

Edit rc.local

vi /etc/rc.local

Isi

ifconfig wlan0 10.123.123.223 netmask 255.0.0.0 (IP ADDRESS sama dengan IP addres di /etc/config/network  di ATAS)
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
/etc/init.d/telnet stop
/etc/init.d/olsrd stop
olsrd -f /etc/olsrd.conf &

exit 0


Nampaknya NAT sebaiknya di aktifkan di rc.local. Semua setting /etc/config/firewall di matikan agar OLSR tidak rewel.

Buat file /etc/olsrd.conf

Edit

vi /etc/olsrd.conf

Isi dengan

# DebugLevel 0
# AllowNoInt yes
# IpVersion 4
# RtTable 111
# RtTableDefault 112

Hna4
{
# 0.0.0.0 0.0.0.0            # JIKA INGIN memberitahukan bahwa kita adalah gateway ke Internet
# 192.168.0.0 255.255.255.0  # JIKA INGIN memberitahukan kita gateway ke 192.168.0.0/24
}

Hna6
{
} 

LoadPlugin "olsrd_arprefresh.so.0.1"
{
}

LoadPlugin "olsrd_nameservice.so.0.3"
{
        PlParam "name" "NAMA-NODE-Mesh-ini"
        PlParam "latlon-file" "/var/run/latlon.js"
        PlParam "hosts-file" "/var/etc/hosts.olsr"
        PlParam "sighup-pid-file" "/var/run/dnsmasq.pid"
        PlParam "services-file" "/var/run/services_olsr"
        PlParam "suffix" ".olsr"
}

LoadPlugin "olsrd_txtinfo.so.0.1"   
{                                    
        PlParam "accept" "0.0.0.0"   
}                                    
                                                  
LoadPlugin "olsrd_watchdog.so.0.1"                
{                                                       
        PlParam "file" "/var/run/olsrd.watchdog"        
        PlParam "interval" "30"                         
}                                                       
                                                        
LoadPlugin "olsrd_jsoninfo.so.0.0"                      
{                                                       
}                                                       
                                  
InterfaceDefaults                 
{                                 
        Ip4Broadcast 255.255.255.255
}                                               
                                               
Interface "wlan0"                               
{
        mode mesh
} 


Daftar lengkap olsrd plugin yang ada bisa dilihat di

/usr/lib

Pranala Menarik

Build Firmware

APRX

IPv6

Flash Firmware

Misc

UBNT