Advertisement
DanPacu

rc.local

Feb 4th, 2020
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1.  
  2. #!/bin/sh -e
  3. #
  4. # rc.local
  5. #
  6. # This script is executed at the end of each multiuser runlevel.
  7. # Make sure that the script will "exit 0" on success or any other
  8. # value on error.
  9. #
  10. # In order to enable or disable this script just change the execution
  11. # bits.
  12. #
  13. # By default this script does nothing.
  14. iptables -A INPUT -i wlan0 -p tcp -s 192.168.1.1/150 -d 192.168.1.71 -j ACCEPT
  15. iptables -A INPUT -i wlan0 -p udp -s 192.168.1.1/150 -d 192.168.1.71 -j ACCEPT
  16. # Print the IP address
  17. _IP=$(hostname -I) || true
  18. if [ "$_IP" ]; then
  19. printf "My IP address is %s\n" "$_IP"
  20. fi
  21.  
  22. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement