Advertisement
Guest User

Untitled

a guest
Sep 9th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.09 KB | None | 0 0
  1. # Configura il firewall per la rete hotspot
  2.  
  3. ## Configura la zona hotspot
  4. uci delete firewall.hotspot_zone
  5. uci set firewall.hotspot_zone=zone
  6. uci set firewall.hotspot_zone.name=hotspot
  7. uci set firewall.hotspot_zone.network=hotspot
  8. uci set firewall.hotspot_zone.input=REJECT
  9. uci set firewall.hotspot_zone.forward=REJECT
  10. uci set firewall.hotspot_zone.output=ACCEPT
  11.  
  12. ## Abilita hotspot -> Internet
  13. uci delete firewall.hotspot_forwarding
  14. uci set firewall.hotspot_forwarding=forwarding
  15. uci set firewall.hotspot_forwarding.src=hotspot
  16. uci set firewall.hotspot_forwarding.dest=wan
  17.  
  18. ## Abilita DNS hotspot -> Router
  19. uci delete firewall.hotspot_rule_dns
  20. uci set firewall.hotspot_rule_dns=rule
  21. uci set firewall.hotspot_rule_dns.name='Allow DNS Queries'
  22. uci set firewall.hotspot_rule_dns.src=hotspot
  23. uci set firewall.hotspot_rule_dns.dest_port=53
  24. uci set firewall.hotspot_rule_dns.proto=udp
  25. uci set firewall.hotspot_rule_dns.target=ACCEPT
  26.  
  27. ## Abilita DHCP hotspot -> Router
  28. uci delete firewall.hotspot_rule_dhcp
  29. uci set firewall.hotspot_rule_dhcp=rule
  30. uci set firewall.hotspot_rule_dhcp.name='Allow DHCP request'
  31. uci set firewall.hotspot_rule_dhcp.src=hotspot
  32. uci set firewall.hotspot_rule_dhcp.src_port=68
  33. uci set firewall.hotspot_rule_dhcp.dest_port=67
  34. uci set firewall.hotspot_rule_dhcp.proto=udp
  35. uci set firewall.hotspot_rule_dhcp.target=ACCEPT
  36.  
  37. ## Abilita hotspot -> Internet HTTP
  38. uci delete firewall.hotspot_rule_http
  39. uci set firewall.hotspot_rule_http=rule
  40. uci set firewall.hotspot_rule_http.name='Allow HTTP request'
  41. uci set firewall.hotspot_rule_http.src=hotspot
  42. uci set firewall.hotspot_rule_http.dest_port=80
  43. uci set firewall.hotspot_rule_http.proto=tcp
  44. uci set firewall.hotspot_rule_http.target=ACCEPT
  45.  
  46. ## Abilita hotspot -> Internet HTTPs
  47. uci delete firewall.hotspot_rule_https
  48. uci set firewall.hotspot_rule_https=rule
  49. uci set firewall.hotspot_rule_https.name='Allow HTTPs request'
  50. uci set firewall.hotspot_rule_https.src=hotspot
  51. uci set firewall.hotspot_rule_https.dest_port=443
  52. uci set firewall.hotspot_rule_https.proto=tcp
  53. uci set firewall.hotspot_rule_https.target=ACCEPT
  54.  
  55. ## Abilita hotspot -> Internet SMTP
  56. uci delete firewall.hotspot_rule_smtp
  57. uci set firewall.hotspot_rule_smtp=rule
  58. uci set firewall.hotspot_rule_smtp.name='Allow SMTP request'
  59. uci set firewall.hotspot_rule_smtp.src=hotspot
  60. uci set firewall.hotspot_rule_smtp.dest_port=25
  61. uci set firewall.hotspot_rule_smtp.proto=tcp
  62. uci set firewall.hotspot_rule_smtp.target=ACCEPT
  63.  
  64. ## Abilita hotspot -> Internet SMTPs
  65. uci delete firewall.hotspot_rule_smtps
  66. uci set firewall.hotspot_rule_smtps=rule
  67. uci set firewall.hotspot_rule_smtps.name='Allow SMTPs request'
  68. uci set firewall.hotspot_rule_smtps.src=hotspot
  69. uci set firewall.hotspot_rule_smtps.dest_port=25
  70. uci set firewall.hotspot_rule_smtps.proto=tcp
  71. uci set firewall.hotspot_rule_smtps.target=ACCEPT
  72.  
  73. ## Abilita hotspot -> Internet SMTP-TLS
  74. uci delete firewall.hotspot_rule_smtptls
  75. uci set firewall.hotspot_rule_smtptls=rule
  76. uci set firewall.hotspot_rule_smtptls.name='Allow SMTP-TLS request'
  77. uci set firewall.hotspot_rule_smtptls.src=hotspot
  78. uci set firewall.hotspot_rule_smtptls.dest_port=587
  79. uci set firewall.hotspot_rule_smtptls.proto=tcp
  80. uci set firewall.hotspot_rule_smtptls.target=ACCEPT
  81.  
  82. ## Abilita hotspot -> Internet SMTPs
  83. uci delete firewall.hotspot_rule_smtps
  84. uci set firewall.hotspot_rule_smtps=rule
  85. uci set firewall.hotspot_rule_smtps.name='Allow SMTP-SSL request'
  86. uci set firewall.hotspot_rule_smtps.src=hotspot
  87. uci set firewall.hotspot_rule_smtps.dest_port=465
  88. uci set firewall.hotspot_rule_smtps.proto=tcp
  89. uci set firewall.hotspot_rule_smtps.target=ACCEPT
  90.  
  91. ## Abilita hotspot -> Internet POP3
  92. uci delete firewall.hotspot_rule_pop3
  93. uci set firewall.hotspot_rule_pop3=rule
  94. uci set firewall.hotspot_rule_pop3.name='Allow POP3 request'
  95. uci set firewall.hotspot_rule_pop3.src=hotspot
  96. uci set firewall.hotspot_rule_pop3.dest_port=110
  97. uci set firewall.hotspot_rule_pop3.proto=tcp
  98. uci set firewall.hotspot_rule_pop3.target=ACCEPT
  99.  
  100. ## Abilita hotspot -> Internet POP3s
  101. uci delete firewall.hotspot_rule_pop3s
  102. uci set firewall.hotspot_rule_pop3s=rule
  103. uci set firewall.hotspot_rule_pop3s.name='Allow POP3s request'
  104. uci set firewall.hotspot_rule_pop3s.src=hotspot
  105. uci set firewall.hotspot_rule_pop3s.dest_port=995
  106. uci set firewall.hotspot_rule_pop3s.proto=tcp
  107. uci set firewall.hotspot_rule_pop3s.target=ACCEPT
  108.  
  109. ## Abilita hotspot -> Internet IMAP e IMAP TLS
  110. uci delete firewall.hotspot_rule_imap
  111. uci set firewall.hotspot_rule_imap=rule
  112. uci set firewall.hotspot_rule_imap.name='Allow IMAP request'
  113. uci set firewall.hotspot_rule_imap.src=hotspot
  114. uci set firewall.hotspot_rule_imap.dest_port=143
  115. uci set firewall.hotspot_rule_imap.proto=tcp
  116. uci set firewall.hotspot_rule_imap.target=ACCEPT
  117.  
  118. ## Abilita hotspot -> Internet IMAP-SSL
  119. uci delete firewall.hotspot_rule_imaps
  120. uci set firewall.hotspot_rule_imaps=rule
  121. uci set firewall.hotspot_rule_imaps.name='Allow IMAP-SSL request'
  122. uci set firewall.hotspot_rule_imaps.src=hotspot
  123. uci set firewall.hotspot_rule_imaps.dest_port=993
  124. uci set firewall.hotspot_rule_imaps.proto=tcp
  125. uci set firewall.hotspot_rule_imaps.target=ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement