【发布时间】:2011-11-18 15:12:55
【问题描述】:
我在 FreeBSD 8.2 上使用 ipf+ipnat 安装了防火墙,也使用 SQUID 2.7 作为网络代理
所有用户都可以上网,但我最大的问题是IP电话,他们尝试访问互联网上的sip服务器(外部提供商服务),他们无法建立连接。
用于 sip 服务的端口是: SIP:端口 5060-5070 UDP/TCP RTP(语音)流量:端口 10000-20000 UDP
这是我目前的系统配置,有问题,但我不知道是什么
接口: rl0 = 局域网办公室 192.168.10.x bge0 = WAN 互联网连接
rc.conf:
squid_enable="YES"
ipfilter_enable="YES"
ipfilter_rules="/etc/ipf.rules"
ipmon_enable="YES"
ipmon_flags="-Ds"
gateway_enable="YES"
ipnat_enable="YES"
ipnat_rules="/etc/ipnat.rules"
ipf.rules:
pass out quick on rl0 all
pass in quick on rl0 all
pass out quick on bge0 all
pass in quick on bge0 all
pass in quick on lo0 all
pass out quick on lo0 all
我打开了两个接口的所有流量(暂时),但我没有得到好的结果,所有的 ip 电话都不能工作
ipnat.rules:
rdr rl0 0.0.0.0/0 port 80 -> 127.0.0.1 port 8080 tcp # transparent proxy
rdr bge0 0.0.0.0/0 port 22 -> 127.0.0.1 port 22 tcp # ssh server
map bge0 192.168.10.0/16 -> 0.0.0.0/32 proxy port ftp ftp/tcp
map bge0 192.168.10.0/16 -> 0.0.0.0/32 portmap tcp/udp auto
map bge0 192.168.10.0/16 -> 0.0.0.0/32
所有 ip 电话和计算机都有静态 ip,freebsd 服务器作为网关和一个有效的 DNS 服务器。
【问题讨论】:
标签: firewall sip freebsd squid nat