Advertisement
abrodkin

S30yotadmin

Aug 9th, 2011
440
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # DESCRIPTION
  4. # "yotadmin" script for Asus wl500g router.
  5. #
  6. # Adds new WAN network interface and
  7. # creates route for Yota-Street web-ui
  8. # than Yota-street web-ui is available at YOTA_STREET_IP
  9. # from internet browser within LAN
  10. #
  11. #
  12. # INSTRUCTIONS
  13. # Put script in "/usr/local/sbin"
  14. # Save flashfs:
  15. # flashfs save && flashfs commit && flashfs enable
  16. # Reboot device
  17. # reboot
  18.  
  19. # WAN interface name
  20. WAN_INTERFACE="vlan1"
  21.  
  22. # Yota-street web-ui IP
  23. YOTA_STREET_IP="192.168.1.1"
  24.  
  25. # Router self IP on additional WAN interface
  26. ASUS_IP="192.168.1.100"
  27.  
  28. # Log to stderr as well as the system log
  29. LOGGER_OPTIONS=-s
  30.  
  31. logger $LOGGER_OPTIONS "Setup $WAN_INTERFACE:1 $ASUS_IP to access web-ui on $YOTA_STREET_IP"
  32. ifconfig $WAN_INTERFACE:1 $ASUS_IP
  33. iptables -t nat -A POSTROUTING -d $YOTA_STREET_IP -j MASQUERADE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement