Edit Script File
This page is used to edit your personal script file, which is loaded from /etc/init.sh.
*** WARNING: Do not forget to apply changes after making modifications! ***
#!/bin/sh ############# PERSONAL SCRIPT ################### # # # This file contains personal rule by the user # # # ################################################# # Lines beggining with "#" will be ignored ################################################################# #### FIREWALL AND ROUTING STUFF #### ## STATIC ROUTING (DISABLE NAT) EXAMPLE ## flushin NAT rules and turning default FORWARD policy to ACCEPT # iptables -t nat -F # iptables -P FORWARD ACCEPT ## STATIC ROUTING TO SPECIFIC NETWORK # iptables -t nat -I PREROUTING -s 200.248.132.27/24 -j ACCEPT # iptables -t nat -I POSTROUTING -s 200.248.132.27/24 -j ACCEPT # iptables -I FORWARD -s 200.248.132.27/24 -j ACCEPT # iptables -I FORWARD -d 200.248.132.27/24 -j ACCEPT ## REDIRECT EXAMPLE # iptables -t nat -I PREROUTING -d 200.248.132.2 -j DNAT \ # --to-destination 192.168.2.2 # iptables -t nat -I POSTROUTING -s 192.168.2.2 -j SNAT \ # --to-source 200.248.132.2 ## CREATING STATIC ROUTE # route add -net 192.168.200.0 netmask 255.255.255.0 gw 192.168.2.2 #------------------------------------ #### IP ALIAS #### ## LAN ALIAS: # ifconfig br0:6 192.168.100.1 netmask 255.255.255.0 ## WAN ALIAS ## if configured as Gateway mode # ifconfig eth1:6 192.168.100.1 netmask 255.255.255.0 ## If configured as WISP mode # ifconfig wlan0:6 192.168.100.1 netmask 255.255.255.0 #------------------------------------ #### MAC ACCESS CONTROL #### ## DO NOT FORGET TO ENABLE WIRELESS ACCESS CONTROL VIA WEB INTERFACE ## The following command is used to flush mac access control entries # iwpriv wlan0 set_mib aclnum=0 ## Example how to use mac access control via script ## First step, shutting down wireless interface # ifconfig wlan0 down # iwpriv wlan0 set_mib acladdr=004f62033543 # iwpriv wlan0 set_mib acladdr=004f33333333 # iwpriv wlan0 set_mib acladdr=004f22222222 ## Now, getting up again # ifconfig wlan0 up