标签:regex SIP plugin ALG list code NAT Openwrt
Openwrt NAT ALG
FTP SIP PPTP / NAT ALG
https://forum.openwrt.org/t/sip-alg-on-openwrt/88062
安装对应kerner mod
root@OpenWrt:~# opkg install kmod-nf-nathelper-extra
启用对应配置
root@OpenWrt:~# cat /etc/sysctl.d/11-nf-conntrack.conf
net.netfilter.nf_conntrack_helper=1
Are slipstream attacks possible through an OpenWRT router with the default configuration? It seems the NAT slipstream attack was announced the day before yesterday. In short, it is described as an attack on web browsers behind Application-level Gateway (ALG) capable routers. I do not fully understand whether that applies to OpenWRT or not. What I did learn and understand is that according to Wikipedia, ALG is in netfilter on Linux. Unfortunately I could not detuct the answer to my question fro…
With the package kmod-nf-nathelper-extra which I use for proto_gre (and also unfortunately loads sip helper modules) the router is vulnerable as tested on this site: http://samy.pl/slipstream/server So at the moment, the best course of action is to NOT use any NAT helper modules.
https://openwrt.org/docs/guide-user/services/voip/siproxd
Siproxd is a proxy/masquerading daemon for the SIP protocol. It handles registrations of SIP clients on a private IP network and performs rewriting of the SIP message bodies to make SIP connections work via an masquerading firewall (NAT). It allows SIP software clients (like kphone, linphone) or SIP hardware clients (Voice over IP phones which are SIP-compatible) to work behind an IP masquerading firewall or NAT router.
Siproxd configuration
In /etc/config/siproxd
you can configure Siproxd. You can add to the default configuration to setup the plugins that you'd like to use. For example to load and configure the regex plugin something along the following lines would be appropriate:
# Load regex plugin and define some replacement rules to ensure that # local and domestic numbers without area/country code are dialled # properly: list load_plugin 'plugin_regex.so' # International calls, prefix 00 converted to +: # 00 385 1 123456 -> +385 1 123456 list plugin_regex_desc = 'Intl' list plugin_regex_pattern = '^(sips?:)00' list plugin_regex_replace = '\1+' # Domestic calls to a different area code, drop the 0 and prefix with # country code added: # 01 123456 -> +385 1 123456 list plugin_regex_desc = 'Domestic' list plugin_regex_pattern = '^(sips?:)0' list plugin_regex_replace = '\1+385' # Local calls without an area code - prefix with country code + local # area code: # 123456 -> +385 1 123456 list plugin_regex_desc = 'Local' list plugin_regex_pattern = '^(sips?:)' list plugin_regex_replace = '\1+3851'
标签:regex,SIP,plugin,ALG,list,code,NAT,Openwrt 来源: https://www.cnblogs.com/lsgxeva/p/16462241.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。