Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. #!/bin/sh
  2. # Configure Wifi Access Point.
  3. #
  4. ### BEGIN INIT INFO
  5. # Provides:          WifiAP
  6. # Required-Start:    $remote_fs $syslog
  7. $time
  8. # Required-Stop:     $remote_fs $syslog $time
  9. # Should-Start:      $network $named slapd autofs ypbind nscd nslcd
  10. # Should-Stop:       $network $named slapd autofs ypbind nscd nslcd
  11. # Default-Start:     2
  12. # Default-Stop:
  13. # Short-Description: Wifi Access Point configuration
  14.  
  15. # Description:       Sets forwarding, starts hostap, enables NAT in iptables
  16. ### END INIT INFO
  17.  
  18. # turn on forwarding
  19. echo 1 > /proc/sys/net/ipv4/ip_forward
  20.  
  21. # enable NAT
  22. iptables -t nat -A POSTROUTING -j MASQUERADE
  23.  
  24. # start the access point
  25. hostapd -B /etc/hostapd/hostapd.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement