Contents

Secure Shell Access (SSH) and available commands explained.


OSWave offers you access to the Linux system shell using ssh (Secure Shell Access) client.

Most of the Linux distributions have built in ssh clients which you can run by just typing ssh at the command prompt, for Windows there is a free client software called PuTTY which you can download here.

Basic information on what can be achieved using Linux shell is available on the linuxcommand.org site.

To access OSWave from Linux running system please type:

[root@linux]# ssh -l admin 192.168.1.251

And you will be provided OSWave command prompt:

oswave>

Most of the regular Linux shell commands are available:

oswave>ls /bin
zcat            tc              rp-pppoe.so     pppoe.sh        mount           iwpriv          ip              echo            cp              athstats
wpa_supplicant  tar             rm              pppoe-relay     mkdir           iwlist          gzip            ebtables        clock.sh        athctrl
wlanconfig      suser           register        pppd            mini_httpd      iwconfig        gunzip          dropbearkey     chmod           ash
wlan0.bound     start.sh        redins          polling.sh      mem2.sh         iptunnel        grep            dropbear        cat             ani
uname           sleep           put_stats.sh    ping            mem.sh          iptables        fun.sh          dhcprelay       busybox         aggregation.sh
udhcpd          sh              ps              pico            ls              iproute         flash           df              brctl           80211stats
touch           rrdupdate.sh    pptp.sh         osd             login           iplink          erase           date            br_e.sh
tftpd           rrdtool         pptp            nano            kill            ipaddr          eeprom          cpu             br_d.sh
oswave>ls /sbin
syslogd   route     rmmod     reboot    poweroff  lsmod     insmod    init      ifconfig  halt      getty
oswave>

oswave>cat /proc/meminfo
        total:    used:    free:  shared: buffers:  cached:
Mem:  12570624  9564160  3006464        0  1138688  4087808
Swap:        0        0        0
MemTotal:        12276 kB
MemFree:          2936 kB
MemShared:           0 kB
Buffers:          1112 kB
Cached:           3992 kB
SwapCached:          0 kB
Active:           3300 kB
Inactive:         2380 kB
HighTotal:           0 kB
HighFree:            0 kB
LowTotal:        12276 kB
LowFree:          2936 kB
SwapTotal:           0 kB
SwapFree:            0 kB
oswave>cat /proc/cpuinfo
system type             : Atheros AR531X
processor               : 0
cpu model               : MIPS 4Kc V0.10
BogoMIPS                : 179.81
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes
VCED exceptions         : not available
VCEI exceptions         : not available
oswave>

Available Shell Commands


List of currently available shell commands:

  • ifconfig provides information about system interfaces.
oswave>ifconfig
br0       Link encap:Ethernet  HWaddr 00:0B:6B:3F:54:CA  
          inet addr:192.168.1.251  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:427 errors:0 dropped:0 overruns:0 frame:0
          TX packets:428 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:34973 (34.1 KiB)  TX bytes:77712 (75.8 KiB)

eth0      Link encap:Ethernet  HWaddr 00:0B:6B:3F:54:CA  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:427 errors:0 dropped:0 overruns:0 frame:0
          TX packets:855 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:42031 (41.0 KiB)  TX bytes:78864 (77.0 KiB)

eth1      Link encap:Ethernet  HWaddr 00:0B:6B:3F:54:CA  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:212 errors:0 dropped:0 overruns:0 frame:0
          TX packets:212 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:17816 (17.3 KiB)  TX bytes:17816 (17.3 KiB)

wifi0     Link encap:Ethernet  HWaddr 00:0B:6B:3F:54:CA  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:199 
          RX bytes:0 (0.0 B)  TX bytes:40 (40.0 B)
          Interrupt:5 Memory:b8500000-b85ffffc 

oswave>

In this example br0 is a bridge interface, eth0 is physical ethernet interface (it is added to the br0 bridge), eth1 is a virtual radio interface (it is added to the br0 bridge too), lo is a loopback interface and wifi0 is a physical radio interface.

oswave>iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wifi0     no wireless extensions.

eth1      IEEE 802.11a  ESSID:"oswave"  
          Mode:Master  Frequency:5.33GHz  Access Point: 00:0B:6B:3F:54:CA  
          Bit Rate:0kb/s   Tx-Power:20 dBm   Sensitivity=0/3  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0/94  Signal level:-95 dBm  Noise level:-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

br0       no wireless extensions.

oswave>
  • Wireless Driver used in OSWave is based on MadWiFI project and you may find these docs:

First Time HowTo
User Docs

useful to find what and how can be configured.

Following commands are used to manipulate the wireless interface:

wlanconfig

Using 5 GHz frequency wlanconfig provides list of available channels:

oswave>wlanconfig eth1 list chan
Channel 234 : 4920  Mhz 11a          Channel 103 : 5515  Mhz 11a          
Channel 235 : 4925  Mhz 11a          Channel 104 : 5520  Mhz 11a          
Channel 236 : 4930  Mhz 11a          Channel 105 : 5525  Mhz 11a          
Channel 237 : 4935  Mhz 11a          Channel 106 : 5530  Mhz 11a          
Channel 238 : 4940  Mhz 11a          Channel 107 : 5535  Mhz 11a          
Channel 239 : 4945  Mhz 11a          Channel 108 : 5540  Mhz 11a          
Channel 240 : 4950  Mhz 11a          Channel 109 : 5545  Mhz 11a          
Channel 241 : 4955  Mhz 11a          Channel 110 : 5550  Mhz 11a          
Channel 242 : 4960  Mhz 11a          Channel 111 : 5555  Mhz 11a          
Channel 243 : 4965  Mhz 11a          Channel 112 : 5560  Mhz 11a          
Channel 244 : 4970  Mhz 11a          Channel 113 : 5565  Mhz 11a          
Channel 245 : 4975  Mhz 11a          Channel 114 : 5570  Mhz 11a          
Channel 246 : 4980  Mhz 11a          Channel 115 : 5575  Mhz 11a          
Channel 247 : 4985  Mhz 11a          Channel 116 : 5580  Mhz 11a          
Channel 248 : 4990  Mhz 11a          Channel 117 : 5585  Mhz 11a          
Channel 249 : 4995  Mhz 11a          Channel 118 : 5590  Mhz 11a          
Channel 250 : 5000  Mhz 11a          Channel 119 : 5595  Mhz 11a          
Channel   1 : 5005  Mhz 11a          Channel 120 : 5600  Mhz 11a          
Channel   2 : 5010  Mhz 11a          Channel 121 : 5605  Mhz 11a          
Channel   3 : 5015  Mhz 11a          Channel 122 : 5610  Mhz 11a          
Channel   4 : 5020  Mhz 11a          Channel 123 : 5615  Mhz 11a          
Channel   5 : 5025  Mhz 11a          Channel 124 : 5620  Mhz 11a          
Channel   6 : 5030  Mhz 11a          Channel 125 : 5625  Mhz 11a          
Channel   7 : 5035  Mhz 11a          Channel 126 : 5630  Mhz 11a          
Channel   8 : 5040  Mhz 11a          Channel 127 : 5635  Mhz 11a          
Channel   9 : 5045  Mhz 11a          Channel 128 : 5640  Mhz 11a          
Channel  10 : 5050  Mhz 11a          Channel 129 : 5645  Mhz 11a          
Channel  11 : 5055  Mhz 11a          Channel 130 : 5650  Mhz 11a          
Channel  12 : 5060  Mhz 11a          Channel 131 : 5655  Mhz 11a          
Channel  13 : 5065  Mhz 11a          Channel 132 : 5660  Mhz 11a          
Channel  14 : 5070  Mhz 11a          Channel 133 : 5665  Mhz 11a          
Channel  15 : 5075  Mhz 11a          Channel 134 : 5670  Mhz 11a          
Channel  16 : 5080  Mhz 11a          Channel 135 : 5675  Mhz 11a          
Channel  17 : 5085  Mhz 11a          Channel 136 : 5680  Mhz 11a          
Channel  18 : 5090  Mhz 11a          Channel 137 : 5685  Mhz 11a          
Channel  19 : 5095  Mhz 11a          Channel 138 : 5690  Mhz 11a          
Channel  20 : 5100  Mhz 11a          Channel 139 : 5695  Mhz 11a          
Channel  21 : 5105  Mhz 11a          Channel 140 : 5700  Mhz 11a          
Channel  22 : 5110  Mhz 11a          Channel 141 : 5705  Mhz 11a          
Channel  23 : 5115  Mhz 11a          Channel 142 : 5710  Mhz 11a          
Channel  24 : 5120  Mhz 11a          Channel 143 : 5715  Mhz 11a          
Channel  25 : 5125  Mhz 11a          Channel 144 : 5720  Mhz 11a          
Channel  26 : 5130  Mhz 11a          Channel 145 : 5725  Mhz 11a          
Channel  27 : 5135  Mhz 11a          Channel 146 : 5730  Mhz 11a          
Channel  28 : 5140  Mhz 11a          Channel 147 : 5735  Mhz 11a          
Channel  29 : 5145  Mhz 11a          Channel 148 : 5740  Mhz 11a          
Channel  30 : 5150  Mhz 11a          Channel 149 : 5745  Mhz 11a          
Channel  31 : 5155  Mhz 11a          Channel 150 : 5750  Mhz 11a          
Channel  32 : 5160  Mhz 11a          Channel 151 : 5755  Mhz 11a          
Channel  33 : 5165  Mhz 11a          Channel 152 : 5760  Mhz 11a          
Channel  34 : 5170  Mhz 11a          Channel 153 : 5765  Mhz 11a          
Channel  35 : 5175  Mhz 11a          Channel 154 : 5770  Mhz 11a          
Channel  36 : 5180  Mhz 11a          Channel 155 : 5775  Mhz 11a          
Channel  37 : 5185  Mhz 11a          Channel 156 : 5780  Mhz 11a          
Channel  38 : 5190  Mhz 11a          Channel 157 : 5785  Mhz 11a          
Channel  39 : 5195  Mhz 11a          Channel 158 : 5790  Mhz 11a          
Channel  40 : 5200  Mhz 11a          Channel 159 : 5795  Mhz 11a          
Channel  41 : 5205  Mhz 11a          Channel 160 : 5800  Mhz 11a          
Channel  42 : 5210  Mhz 11a          Channel 161 : 5805  Mhz 11a          
Channel  43 : 5215  Mhz 11a          Channel 162 : 5810  Mhz 11a          
Channel  44 : 5220  Mhz 11a          Channel 163 : 5815  Mhz 11a          
Channel  45 : 5225  Mhz 11a          Channel 164 : 5820  Mhz 11a          
Channel  46 : 5230  Mhz 11a          Channel 165 : 5825  Mhz 11a          
Channel  47 : 5235  Mhz 11a          Channel 166 : 5830  Mhz 11a          
Channel  48 : 5240  Mhz 11a          Channel 167 : 5835  Mhz 11a          
Channel  49 : 5245  Mhz 11a          Channel 168 : 5840  Mhz 11a          
Channel  50 : 5250  Mhz 11a          Channel 169 : 5845  Mhz 11a          
Channel  51 : 5255  Mhz 11a          Channel 170 : 5850  Mhz 11a          
Channel  52 : 5260  Mhz 11a          Channel 171 : 5855  Mhz 11a          
Channel  53 : 5265  Mhz 11a          Channel 172 : 5860  Mhz 11a          
Channel  54 : 5270  Mhz 11a          Channel 173 : 5865  Mhz 11a          
Channel  55 : 5275  Mhz 11a          Channel 174 : 5870  Mhz 11a          
Channel  56 : 5280  Mhz 11a          Channel 175 : 5875  Mhz 11a          
Channel  57 : 5285  Mhz 11a          Channel 176 : 5880  Mhz 11a          
Channel  58 : 5290  Mhz 11a          Channel 177 : 5885  Mhz 11a          
Channel  59 : 5295  Mhz 11a          Channel 178 : 5890  Mhz 11a          
Channel  60 : 5300  Mhz 11a          Channel 179 : 5895  Mhz 11a          
Channel  61 : 5305  Mhz 11a          Channel 180 : 5900  Mhz 11a          
Channel  62 : 5310  Mhz 11a          Channel 181 : 5905  Mhz 11a          
Channel  63 : 5315  Mhz 11a          Channel 182 : 5910  Mhz 11a          
Channel  64 : 5320  Mhz 11a          Channel 183 : 5915  Mhz 11a          
Channel  65 : 5325  Mhz 11a          Channel 184 : 5920  Mhz 11a          
Channel  66 : 5330  Mhz 11a          Channel 185 : 5925  Mhz 11a          
Channel  67 : 5335  Mhz 11a          Channel 186 : 5930  Mhz 11a          
Channel  68 : 5340  Mhz 11a          Channel 187 : 5935  Mhz 11a          
Channel  69 : 5345  Mhz 11a          Channel 188 : 5940  Mhz 11a          
Channel  70 : 5350  Mhz 11a          Channel 189 : 5945  Mhz 11a          
Channel  71 : 5355  Mhz 11a          Channel 190 : 5950  Mhz 11a          
Channel  72 : 5360  Mhz 11a          Channel 191 : 5955  Mhz 11a          
Channel  73 : 5365  Mhz 11a          Channel 192 : 5960  Mhz 11a          
Channel  74 : 5370  Mhz 11a          Channel 193 : 5965  Mhz 11a          
Channel  75 : 5375  Mhz 11a          Channel 194 : 5970  Mhz 11a          
Channel  76 : 5380  Mhz 11a          Channel 195 : 5975  Mhz 11a          
Channel  77 : 5385  Mhz 11a          Channel 196 : 5980  Mhz 11a          
Channel  78 : 5390  Mhz 11a          Channel 197 : 5985  Mhz 11a          
Channel  79 : 5395  Mhz 11a          Channel 198 : 5990  Mhz 11a          
Channel  80 : 5400  Mhz 11a          Channel 199 : 5995  Mhz 11a          
Channel  81 : 5405  Mhz 11a          Channel 200 : 6000  Mhz 11a          
Channel  82 : 5410  Mhz 11a          Channel 201 : 6005  Mhz 11a          
Channel  83 : 5415  Mhz 11a          Channel 202 : 6010  Mhz 11a          
Channel  84 : 5420  Mhz 11a          Channel 203 : 6015  Mhz 11a          
Channel  85 : 5425  Mhz 11a          Channel 204 : 6020  Mhz 11a          
Channel  86 : 5430  Mhz 11a          Channel 205 : 6025  Mhz 11a          
Channel  87 : 5435  Mhz 11a          Channel 206 : 6030  Mhz 11a          
Channel  88 : 5440  Mhz 11a          Channel 207 : 6035  Mhz 11a          
Channel  89 : 5445  Mhz 11a          Channel 208 : 6040  Mhz 11a          
Channel  90 : 5450  Mhz 11a          Channel 209 : 6045  Mhz 11a          
Channel  91 : 5455  Mhz 11a          Channel 210 : 6050  Mhz 11a          
Channel  92 : 5460  Mhz 11a          Channel 211 : 6055  Mhz 11a          
Channel  93 : 5465  Mhz 11a          Channel 212 : 6060  Mhz 11a          
Channel  94 : 5470  Mhz 11a          Channel 213 : 6065  Mhz 11a          
Channel  95 : 5475  Mhz 11a          Channel 214 : 6070  Mhz 11a          
Channel  96 : 5480  Mhz 11a          Channel 215 : 6075  Mhz 11a          
Channel  97 : 5485  Mhz 11a          Channel 216 : 6080  Mhz 11a          
Channel  98 : 5490  Mhz 11a          Channel 217 : 6085  Mhz 11a          
Channel  99 : 5495  Mhz 11a          Channel 218 : 6090  Mhz 11a          
Channel 100 : 5500  Mhz 11a          Channel 219 : 6095  Mhz 11a          
Channel 101 : 5505  Mhz 11a          Channel 220 : 6100  Mhz 11a          
Channel 102 : 5510  Mhz 11a          
oswave>

Using 2.4 GHz frequency wlanconfig provides us list of available channels:

oswave>wlanconfig eth1 list chan
Channel  66 : 2312  Mhz 11g          Channel  24 : 2527  Mhz 11g          
Channel  67 : 2317  Mhz 11g          Channel  25 : 2532  Mhz 11g          
Channel  68 : 2322  Mhz 11g          Channel  26 : 2537  Mhz 11g          
Channel  69 : 2327  Mhz 11g          Channel  27 : 2542  Mhz 11g          
Channel  70 : 2332  Mhz 11g          Channel  28 : 2547  Mhz 11g          
Channel  71 : 2337  Mhz 11g          Channel  29 : 2552  Mhz 11g          
Channel  72 : 2342  Mhz 11g          Channel  30 : 2557  Mhz 11g          
Channel  73 : 2347  Mhz 11g          Channel  31 : 2562  Mhz 11g          
Channel  74 : 2352  Mhz 11g          Channel  32 : 2567  Mhz 11g          
Channel  75 : 2357  Mhz 11g          Channel  33 : 2572  Mhz 11g          
Channel  76 : 2362  Mhz 11g          Channel  34 : 2577  Mhz 11g          
Channel  77 : 2367  Mhz 11g          Channel  35 : 2582  Mhz 11g          
Channel  78 : 2372  Mhz 11g          Channel  36 : 2587  Mhz 11g          
Channel  79 : 2377  Mhz 11g          Channel  37 : 2592  Mhz 11g          
Channel  80 : 2382  Mhz 11g          Channel  38 : 2597  Mhz 11g          
Channel  81 : 2387  Mhz 11g          Channel  39 : 2602  Mhz 11g          
Channel  82 : 2392  Mhz 11g          Channel  40 : 2607  Mhz 11g          
Channel  83 : 2397  Mhz 11g          Channel  41 : 2612  Mhz 11g          
Channel  84 : 2402  Mhz 11g          Channel  42 : 2617  Mhz 11g          
Channel   0 : 2407  Mhz 11g          Channel  43 : 2622  Mhz 11g          
Channel   1 : 2412  Mhz 11g          Channel  44 : 2627  Mhz 11g          
Channel   2 : 2417  Mhz 11g          Channel  45 : 2632  Mhz 11g          
Channel   3 : 2422  Mhz 11g          Channel  46 : 2637  Mhz 11g          
Channel   4 : 2427  Mhz 11g          Channel  47 : 2642  Mhz 11g          
Channel   5 : 2432  Mhz 11g          Channel  48 : 2647  Mhz 11g          
Channel   6 : 2437  Mhz 11g          Channel  49 : 2652  Mhz 11g          
Channel   7 : 2442  Mhz 11g          Channel  50 : 2657  Mhz 11g          
Channel   8 : 2447  Mhz 11g          Channel  51 : 2662  Mhz 11g          
Channel   9 : 2452  Mhz 11g          Channel  52 : 2667  Mhz 11g          
Channel  10 : 2457  Mhz 11g          Channel  53 : 2672  Mhz 11g          
Channel  11 : 2462  Mhz 11g          Channel  54 : 2677  Mhz 11g          
Channel  12 : 2467  Mhz 11g          Channel  55 : 2682  Mhz 11g          
Channel  13 : 2472  Mhz 11g          Channel  56 : 2687  Mhz 11g          
Channel  14 : 2477  Mhz 11g          Channel  57 : 2692  Mhz 11g          
Channel  15 : 2482  Mhz 11g          Channel  58 : 2697  Mhz 11g          
Channel  16 : 2487  Mhz 11g          Channel  59 : 2702  Mhz 11g          
Channel  17 : 2492  Mhz 11g          Channel  60 : 2707  Mhz 11g          
Channel  18 : 2497  Mhz 11g          Channel  61 : 2712  Mhz 11g          
Channel  19 : 2502  Mhz 11g          Channel  62 : 2717  Mhz 11g          
Channel  20 : 2507  Mhz 11g          Channel  63 : 2722  Mhz 11g          
Channel  21 : 2512  Mhz 11g          Channel  64 : 2727  Mhz 11g          
Channel  22 : 2517  Mhz 11g          Channel  65 : 2732  Mhz 11g          
Channel  23 : 2522  Mhz 11g          
oswave>

While running in Client mode wlanconfig provides list of scanned Access Points:

oswave>wlanconfig eth1 list ap
SSID            BSSID              CHAN RATE  S:N   INT CAPS
Some_AP         00:90:4b:cc:94:0a    1   11M  8:0   100 ESs 
Default         00:17:9a:6e:6a:87    6   54M 19:0   100 ESs 
0x000000000...  00:15:d6:23:16:04   10   54M 53:0   100 Es  
oswave>

athstats provides one time RF stats information:

oswave>athstats
33 tx management frames
31 tx failed 'cuz too many retries
124 long on-chip tx retries
1 tx frames with no ack marked
25714 rx failed 'cuz of bad CRC
31961 PHY errors
    1349 OFDM timing
    30612 CCK timing
346 periodic calibrations
1 rfgain value change
Antenna profile:
[1] tx        0 rx       89
[2] tx        0 rx        4
oswave>

or can provide RF stats at given interval (1 second in this example):

oswave>athstats 1
   input   output altrate   short    long xretry crcerr  crypt  phyerr rssi rate
      93       33       0       0     124     31  25714      0   34571    0   0M
       0        0       0       0       0      0      0      0      96    0   0M
       0        0       0       0       0      0      0      0      26    0   0M
       0        0       0       0       0      0      0      0     163    0   0M
       0        0       0       0       0      0      0      0      91    0   0M
       0        0       0       0       0      0      0      0      97    0   0M
       0        0       0       0       0      0      0      0      73    0   0M
       0        0       0       0       0      0      0      0     132    0   0M
       0        0       0       0       0      0      0      0      68    0   0M
       0        0       0       0       0      0      0      0      37    0   0M
       0        0       0       0       0      0      0      0     116    0   0M

oswave>
  • eeprom command provides information about RF module built into the device running information. Sample output of eeprom command is available here. What is important is that using eeprom command you can read real tx power information stored in RF module EEPROM and therefore know what transmit power is available at what frequency.
  • tc command is used to manipulate Quality Of Service (QOS) settings.
oswave>tc -help
Usage: tc [ OPTIONS ] OBJECT { COMMAND | help }
where  OBJECT := { qdisc | class | filter }
       OPTIONS := { -s[tatistics] | -d[etails] | -r[aw] | -b[atch] file }
oswave>
  • iptables command is used to manipulate IP firewall in Linux. The manpage for iptables command is available here.
oswave>iptables
iptables v1.2.6a: no command specified
Try `iptables -h' or 'iptables --help' for more information.
oswave>
  • ebtables command is used to manipulate layer-2 (MAC) firewall in Linux. The manpage for ebtables command is available here.
oswave>ebtables
ebtables v2.0.6 (November 2003)
Usage:
ebtables -[ADI] chain rule-specification [options]
ebtables -P chain target
ebtables -[LFZ] [chain]
ebtables -[NX] [chain]
ebtables -E old-chain-name new-chain-name

Commands:
--append -A chain             : append to chain
--delete -D chain             : delete matching rule from chain
--delete -D chain rulenum     : delete rule at position rulenum from chain
--insert -I chain rulenum     : insert rule at position rulenum in chain
--list   -L [chain]           : list the rules in a chain or in all chains
--flush  -F [chain]           : delete all rules in chain or in all chains
--init-table                  : replace the kernel table with the initial table
--zero   -Z [chain]           : put counters on zero in chain or in all chains
--policy -P chain target      : change policy on chain to target
--new-chain -N chain          : create a user defined chain
--rename-chain -E old new     : rename a chain
--delete-chain -X [chain]     : delete a user defined chain
--atomic-commit               : update the kernel w/t table contained in <FILE>
--atomic-init                 : put the initial kernel table into <FILE>
--atomic-save                 : put the current kernel table into <FILE>
--atomic-file file            : set <FILE> to file

Options:
--proto  -p [!] proto         : protocol hexadecimal, by name or LENGTH
--src    -s [!] address[/mask]: source mac address
--dst    -d [!] address[/mask]: destination mac address
--in-if  -i [!] name          : network input interface name
--out-if -o [!] name          : network output interface name
--logical-in  [!] name        : logical bridge input interface name
--logical-out [!] name        : logical bridge output interface name
--modprobe -M program         : try to insert modules using this program
--version -V                  : print package version

Environment variable:
EBTABLES_ATOMIC_FILE          : if set <FILE> (see above) will equal its value

Standard targets: DROP, ACCEPT, RETURN or CONTINUE;
The target can also be a user defined chain.

Supported chains for the filter table:
INPUT FORWARD OUTPUT 
oswave>
  • Busybox provides access to most common and useful Linux shell commands - the manual is available here.
  • brctl command is used to configure bridge settings in Linux.
oswave>brctl --help
Usage: brctl [commands]
commands:
        addbr           <bridge>                add bridge
        delbr           <bridge>                delete bridge
        addif           <bridge> <device>       add interface to bridge
        delif           <bridge> <device>       delete interface from bridge
        nat             nat - special for osbridge
        setageing       <bridge> <time>         set ageing time
        setbridgeprio   <bridge> <prio>         set bridge priority
        setfd           <bridge> <time>         set bridge forward delay
        sethello        <bridge> <time>         set hello time
        setmaxage       <bridge> <time>         set max message age
        setpathcost     <bridge> <port> <cost>  set path cost
        setportprio     <bridge> <port> <prio>  set port priority
        show                                    show a list of bridges
        showmacs        <bridge>                show a list of mac addrs
        showstp         <bridge>                show bridge stp info
        stp             <bridge> {on|off}       turn stp on/off
oswave>

Further reading about brctl:

http://linux-net.osdl.org/index.php/Bridge
http://www.dd-wrt.com/wiki/index.php/Brctl_command

Writing own startup scripts in OSWave


The /mnt system partition is provided for the user to store files there. Content of the /mnt partition is preserver during reboots and power cycles which means that once you put any file there you still will have access to it after device reboot or power off / power on.

There are two files on the /mnt partition that require extra attention.

The first file is named modules:

oswave>ls -l /mnt
-rw-rw-rw-    1 root     root          442 modules
oswave>

It is there from the first boot and you shall not delete it. It contains list of kernel modules that are loaded during the device startup:

oswave>cat /mnt/modules
# /mnt/modules: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line.  Comments begin with
# a `#', and everything on the line after them are ignored.

#ebtables
#ebt_802_3
#ebtable_filter
#ebt_ip
#ip_tables
#ip_conntrack
#ip_conntrack_ftp
#ip_conntrack_irc
#iptable_nat
#ip_nat_ftp
#ip_nat_irc
#ipt_conntrack
#iptable_filter
#ipt_mac
#ipt_MASQUERADE
#ipt_multiport
oswave>

If you are writing your own startup scripts and use iptables and/or ebtables then you need to uncomment required module names here in order for your scripts to work.

The second important file is named init.sh and is a user startup script that is executed during device boot time.

oswave>ls -l /mnt
-rw-rw-rw-    1 root     root          442 modules
-rw-r--r--    1 admin    admin         108 init.sh
oswave>cat /mnt/init.sh
#!/bin/sh

echo "Hello World"
echo "This is my startup script that will run each time the device boots up"

oswave>

Using built in text editor (pico, nano or vi) you can modify the init.sh script:

oswave>pico /mnt/init.sh
  GNU nano 2.0.2             File: /mnt/init.sh                      Modified  

#!/bin/sh

echo "Hello World"
echo "This is my startup script that will run each time the device boots up"
















^G Get Help  ^O WriteOut  ^R Read File ^Y Prev Page ^K Cut Text  ^C Cur Pos
^X Exit      ^J Justify   ^W Where Is  ^V Next Page ^U UnCut Text^T To Spell


Reseting OSWave to default settings.


Should you happen to write a startup script that crashes your OSWave system at startup it is possible to restore your device to factory default settings and prevent running that script at the startup. In order to do so you need to press and keep the built in reset button at the device startup for 20 seconds. OSWave will revert to factory default settings and reboot itself.

Sample startup scripts and command examples.



External links with information on writing shell scripts.


http://en.wikipedia.org/wiki/Shell_script
http://www.freeos.com/guides/lsst/
http://pegasus.rutgers.edu/~elflord/unix/bash-tute.html
http://www.shelldorado.com/


Last modified April 10, 2007 6:40 pm