返回列表 發帖
回復 81# orangelau


    /opt/sipserver/msscli &

TOP

回復 84# Qnewbie

請留意自家製的目的asterisk + USB 3G 上網手指,所以沒有 上網手指可以考慮在 /etc/asterisk/modules加入
unload chan_dongle.so

或在/usr/lib/asterisk/modules,移除 chan_dongle.so

其他功能是因應最想有的去加入,如 sms gateway 應用於上網手指,fax gateway。

其實如果有時間的話,可以去raspberrry pi 官方論壇,就可以找到自己想要的功能,然後加上去。

TOP

回復 83# 角色

我未發放嗎!先前做的版本不太滿意,所以要收起,遲些更新後才發放,

TOP

防火牆 Iptables 參考例子
  1. # Firewall configuration written by system-config-firewall
  2. # Manual customization of this file is not recommended.
  3. *filter
  4. :INPUT ACCEPT [0:0]
  5. :FORWARD ACCEPT [0:0]
  6. :OUTPUT ACCEPT [0:0]
  7. -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  8. -A INPUT -p icmp -j ACCEPT
  9. -A INPUT -i lo -j ACCEPT

  10. # VPN
  11. -A INPUT -m state --state NEW -m tcp -p tcp --dport 47 -m comment --comment "PPTP" -j ACCEPT
  12. -A INPUT -m state --state NEW -m tcp -p tcp --dport 1723 -m comment --comment "PPTP" -j ACCEPT
  13. -A INPUT -m state --state NEW -m udp -p udp --dport 500 -m comment --comment "IPSEC" -j ACCEPT

  14. # FTP
  15. -A INPUT -m state --state NEW -m tcp -p tcp --dport 21 -m comment --comment "FTP" -j ACCEPT

  16. # SSH
  17. -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -m comment --comment "SSH" -j ACCEPT

  18. # allow time sync via NTP for lan users (open udp port 123) ##
  19. -A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 123 -m comment --comment "NTP" -j ACCEPT

  20. # open dns server ports for all #
  21. -A INPUT -m state --state NEW -p udp --dport 53 -m comment --comment "DNS" -j ACCEPT
  22. -A INPUT -m state --state NEW -p tcp --dport 53 -m comment --comment "DNS"-j ACCEPT


  23. # Mail Server
  24. -A INPUT -m state --state NEW -m tcp -p tcp --dport 25 -m comment --comment "SMTP" -j ACCEPT
  25. -A INPUT -m state --state NEW -m tcp -p tcp --dport 110 -m comment --comment "POP3" -j ACCEPT
  26. -A INPUT -m state --state NEW -m tcp -p tcp --dport 143 -m comment --comment "IMAP" -j ACCEPT

  27. # Squid
  28. -A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -m comment --comment "Proxy" -j ACCEPT


  29. # WEB SERVER
  30. -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -m comment --comment "HTTP" -j ACCEPT
  31. -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -m comment --comment "HTTPS" -j ACCEPT

  32. # WEB SERVER with WebDAV support
  33. -A INPUT -m state --state NEW -m tcp -p tcp --dport 1980 -m comment --comment "HTTP with WebDAV" -j ACCEPT

  34. #NETAFP
  35. -A INPUT -m state --state NEW -m tcp -p tcp --dport 548 -m comment --comment "NETAFP" -j ACCEPT
  36. -A INPUT -m state --state NEW -m udp -p udp --dport 548 -m comment --comment "NETAFP" -j ACCEPT
  37. -A INPUT -m state --state NEW -m tcp -p tcp --dport 5353 -m comment --comment "NETAFP" -j ACCEPT
  38. -A INPUT -m state --state NEW -m udp -p udp --dport 5353 -m comment --comment "NETAFP" -j ACCEPT
  39. -A INPUT -m state --state NEW -m tcp -p tcp --dport 5354 -m comment --comment "NETAFP" -j ACCEPT
  40. -A INPUT -m state --state NEW -m udp -p udp --dport 5354 -m comment --comment "NETAFP" -j ACCEPT

  41. # VOIP Ports
  42. -A INPUT -m state --state NEW -m tcp -p tcp --dport 3478 -m comment --comment "Stun TCP" -j ACCEPT
  43. -A INPUT -m state --state NEW -m udp -p udp --dport 3478 -m comment --comment "Stun UDP" -j ACCEPT
  44. -A INPUT -m state --state NEW -m udp -p udp --dport 5060:5080 -m comment --comment "SIP UDP" -j ACCEPT
  45. -A INPUT -m state --state NEW -m tcp -p tcp --dport 5060:5080 -m comment --comment "SIP TCP" -j ACCEPT
  46. -A INPUT -m state --state NEW -m udp -p udp --dport 4569 -m comment --comment "IAX2" -j ACCEPT
  47. -A INPUT -m state --state NEW -m udp -p udp --dport 5036 -m comment --comment "IAX" -j ACCEPT
  48. -A INPUT -m state --state NEW -m udp -p udp --dport 10000:20000 -m comment --comment "RTP" -j ACCEPT
  49. -A INPUT -m state --state NEW -m udp -p udp --dport 2727 -m comment --comment "MGCP" -j ACCEPT

  50. # Asterisk GUI
  51. -A INPUT -m state --state NEW -m tcp -p tcp --dport 5038 -m comment --comment "AMI" -j ACCEPT
  52. -A INPUT -m state --state NEW -m tcp -p tcp --dport 8088 -m comment --comment "GUI" -j ACCEPT

  53. # VNC
  54. -A INPUT -m state --state NEW -m tcp -p tcp --dport 5900:5903 -m comment --comment "VNC" -j ACCEPT

  55. # RDP
  56. -A INPUT -m state --state NEW -m tcp -p tcp --dport 3389 -m comment --comment "RDP" -j ACCEPT

  57. # webmin
  58. -A INPUT -m state --state NEW -m tcp -p tcp --dport 10000 -m comment --comment "Webmin" -j ACCEPT

  59. # NFS
  60. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 111 -m comment --comment "NFS" -j ACCEPT
  61. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 111 -m comment --comment "NFS" -j ACCEPT
  62. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 2049 -m comment --comment "NFS" -j ACCEPT
  63. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 32803 -m comment --comment "NFS" -j ACCEPT
  64. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 32769 -m comment --comment "NFS" -j ACCEPT
  65. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 892 -m comment --comment "NFS" -j ACCEPT
  66. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 892 -m comment --comment "NFS" -j ACCEPT
  67. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 875 -m comment --comment "NFS" -j ACCEPT
  68. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 875 -m comment --comment "NFS" -j ACCEPT
  69. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 662 -m comment --comment "NFS" -j ACCEPT
  70. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 662 -m comment --comment "NFS" -j ACCEPT

  71. # Samba AD
  72. #-A INPUT -m udp -p udp --dport 53 -m comment --comment "DNS" -j ACCEPT
  73. #-A INPUT -m udp -p udp --dport 123 -m comment --comment "NTP" -j ACCEPT
  74. #-A INPUT -m udp -p udp --dport 135 -m comment --comment "RPC UDP" -j ACCEPT
  75. #-A INPUT -m udp -p udp --dport 138 -m comment --comment "NetBIOS Netlogon and Browsing" -j ACCEPT
  76. #-A INPUT -m udp -p udp --dport 389 -m comment --comment "LDAP UDP" -j ACCEPT
  77. #-A INPUT -m state --state NEW -m tcp -p tcp --dport 88 -m comment --comment "Kerberos" -j ACCEPT
  78. #-A INPUT -m state --state NEW -m tcp -p tcp --dport 464 -m comment --comment "Kerberos Password Management" -j ACCEPT
  79. #-A INPUT -m state --state NEW -m tcp -p tcp --dport 139 -m comment --comment "NetBIOS Session" -j ACCEPT
  80. #-A INPUT -m state --state NEW -m tcp -p tcp --dport 445 -m comment --comment "SMB CIFS" -j ACCEPT
  81. #-A INPUT -m state --state NEW -m tcp -p tcp --dport 389 -m comment --comment "LDAP TCP" -j ACCEPT
  82. #-A INPUT -m state --state NEW -m tcp -p tcp --dport 636 -m comment --comment "LDAP SSL" -j ACCEPT
  83. #-A INPUT -m state --state NEW -m tcp -p tcp --dport 3268 -m comment --comment "LDAP Global Catalog" -j ACCEPT
  84. #-A INPUT -m state --state NEW -m tcp -p tcp --dport 3269 -m comment --comment "LDAP Global Catalog SSL" -j ACCEPT

  85. # Samba 4.x
  86. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 389 -m comment --comment "LDAP" -j ACCEPT
  87. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 389 -m comment --comment "LDAP (UDP)" -j ACCEPT
  88. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 636 -m comment --comment "LDAPS" -j ACCEPT
  89. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 53  -m comment --comment "DNS (TCP)"  -j ACCEPT
  90. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 53 -m comment --comment "DNS (UDP)" -j ACCEPT
  91. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 88 -m comment --comment "Kerberos (TCP)" -j ACCEPT
  92. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 88 -m comment --comment "Kerberos (UDP)" -j ACCEPT
  93. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 464 -m comment --comment "Kerberos Password (TCP)" -j ACCEPT
  94. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 464 -m comment --comment "Kerberos Password (UDP)" -j ACCEPT
  95. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 135 -m comment --comment "RPC" -j ACCEPT
  96. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 137 -m comment --comment "NetBIOS Name Service" -j ACCEPT
  97. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 138 -m comment --comment "NetBIOS Datagram Service" -j ACCEPT
  98. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 139 -m comment --comment "NetBIOS Session Service" -j ACCEPT
  99. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 445 -m comment --comment "MS Directory Service" -j ACCEPT
  100. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 3268 -m comment --comment "MS Global Catalog" -j ACCEPT
  101. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 1024 -m comment --comment "DCOM" -j ACCEPT


  102. # iSCSI
  103. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m tcp -p tcp --dport 3260 -m comment --comment "iSCSI" -j ACCEPT
  104. -A INPUT -s 192.168.1.0/24 -m state --state NEW -m udp -p udp --dport 3260 -m comment --comment "iSCSI" -j ACCEPT


  105. -A INPUT -j REJECT --reject-with icmp-host-prohibited
  106. -A FORWARD -j REJECT --reject-with icmp-host-prohibited
  107. COMMIT
  108. # Generated by webmin
  109. *mangle
  110. :FORWARD ACCEPT [0:0]
  111. :INPUT ACCEPT [0:0]
  112. :OUTPUT ACCEPT [0:0]
  113. :PREROUTING ACCEPT [0:0]
  114. :POSTROUTING ACCEPT [0:0]
  115. COMMIT
  116. # Completed
  117. # Generated by webmin
  118. *nat
  119. :OUTPUT ACCEPT [0:0]
  120. :PREROUTING ACCEPT [0:0]
  121. :POSTROUTING ACCEPT [0:0]
  122. COMMIT
  123. # Completed
複製代碼

TOP

Wifi 無線上網和設定 hotspot or access point 會是另一方向,因為細小的 Raspberry Pi 可以放在不同的地方,如果有 wifi 聯網加上 3G,就可以變得更多樣化和便攜。

TOP

回復 89# 亞星


    需要接ATA才實現 PSTN

TOP

可參考下面網頁,設定 Raspberry Pi 為 wireless access point / router

http://sirlagz.net/2012/08/09/ho ... pointrouter-part-1/

TOP

回復 93# 亞星

用serial cable 看 boot 機log,是否 log files 太大搞到冇 space

TOP

回復 88# ckleea

已製作一套 wireless access point scripts

TOP

回復 97# Qnewbie

Strange behaviour. It is related to the extensions_marco.conf that I move out from extensions.conf.

Go to the stock extensions.conf at /etc/asterisk.examples

TOP

回復 101# SuiYan

我的 Sandisk 和你的不一樣  

試下 SD Formatter 或買張 16GB

TOP

回復 104# SuiYan

不是用 file copy,要小心 ACL 和 soft and hard links

其實我現在用的backup image 方法是win32diskimager,我正常在linux server 做 backup 的方法是 tar 每個 directory。

TOP

Huawei E180

TOP

Just come across this script

https://github.com/Douglas6/pinaple

Bluetooth over ethernet

TOP

回復 109# orangelau

我相信你只做了asterisk 設定,所以可以
方法 一
1. 先用winscp 抄出所有 /etc/asterisk 內的files 到 windows
2. 用 Win32diskimager 備份你的第二版
3. 用 Win32diskimage 將下載回來的第五版寫進SD card
4. 啟動SD Card
5. 用 winscp 抄回第1 步備份的files 到 /etc/asterisk

方法 二 (建議做法)
由於我在第五版將一些不需要的 config files 和設定設除,所以最理想的方法是啟動第五版image 後再重新設定。這樣穩定性和功能會有所保證

注意:
第五版已經啟動每週備份設定 /etc 整個directory 功能,備份檔案在 /opt/backup 內。如你亦設定內置的 SSMTP,理論上,你亦會經電郵收到備份檔。

TOP

返回列表