我是openvpn的新手。 我在ubuntu 14.04上有一个openvpn安装程序,它有一个用于身份validation,授权和记帐的AAA后端。 除此之外,我们已经configurationfreeradius从池中分配ips作为framed-ip-address。 从半径日志看来,当authentication和授权成功时,freeradius返回framed-ip-address来响应访问请求消息,但是openvpn似乎忽略了它,并且使用它在服务器伪指令中指定的它自己的ip池。 我想要的是,openvpn尊重freeradius返回的framed-ip-address,但它不。 由于我以前没有openvpn的经验,我会感谢专家的帮助。
这是我认为有问题的configurationopenvpn方面。
本地192.168.7.100
模式服务器
港口443
原型TCP
dev tun
tcp-queue-limit 256
tun-mtu 1500
mssfix 1460
sndbuf 0
rcvbuf 0
密码AES-256-CBC
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
键/etc/openvpn/easy-rsa/keys/server.key
dh /etc/openvpn/easy-rsa/keys/dh2048.pem
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
插件/etc/openvpn/rad/radiusplugin.so /etc/openvpn/rad/443.cnf
客户端证书 – 不要求
用户名,如常见名称
服务器10.10.0.0 255.255.0.0
; ifconfig-pool 10.0.0.0 10.1.255.254
ifconfig-pool-persist ipp.txt
推“redirect网关def1”
推“dhcp-option DNS 8.8.8.8”
推“dhcp-option DNS 8.8.4.4”
reneg-sec 0
保持活力60 120
TCP-NODELAY
COMP-LZO
坚持键
坚持-TUN
状态/etc/openvpn/443.log 1
状态版本1
动词4
pipe理192.168.7.100 7505
NAS标识符= openvpn_tcp_443
服务types= 5
帧协议= 1
NAS端口types= 5
NAS-IP地址= 192.168.7.100
OpenVPNConfig =的/ etc / openvpn下/ tcp_443.conf
子网掩码255.255.255.0 =
overwriteccfiles =真
nonfatalaccounting = FALSE
服务器{
acctport=1813 authport=1812 name=192.168.7.102 retry=1 wait=1 sharedsecret=--redacted--
}
服务器{
acctport=1813 authport=1812 name=192.168.7.103 retry=1 wait=1 sharedsecret=--redacted--
}
谢谢。
======================
我做了以下更改configuration。
拓扑子网
推“拓扑子网”
客户端configuration目录客户端
在添加client-config-dir之后,正在分配framed-ip-address。 如前所述,现在从我的客户,我无法浏览任何东西。 似乎stream量无法正确路由。 似乎有一个路由问题或拓扑或其他我希望openvpn处理,但事实并非如此。 以下是可以帮助理解的相关信息。
分配给openvpn客户端的ip是一个公共ip,其路由在本机的网关上设置。 与strongswan一起使用时,相同的客户端ip可以正常工作。 这意味着它可以正确路由。 但与openvpn,它不。
服务器机器上ifconfig的相关输出。
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.10.0.1 PtP:10.10.0.1 Mask:255.255.255.0 UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
路由的相关输出-n
0.0.0.0 – 准备 – 0.0.0.0 UG 0 0 0 em2
10.10.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
– 准备 – 0.0.0.0 255.255.255.248 U 0 0 0 em2
rp_filter信息:
root @ us1-ps1:〜#sysctl -a | grep rp_filter
net.ipv4.conf.all.arp_filter = 0
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.arp_filter = 0
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.em1.arp_filter = 0
net.ipv4.conf.em1.rp_filter = 0
net.ipv4.conf.em2.arp_filter = 0
net.ipv4.conf.em2.rp_filter = 0
net.ipv4.conf.lo.arp_filter = 0
net.ipv4.conf.lo.rp_filter = 0
net.ipv4.conf.tun0.arp_filter = 0
net.ipv4.conf.tun0.rp_filter = 0
root @ us1-ps1:〜#ping 10.10.0.1
PING 10.10.0.1(10.10.0.1)56(84)字节的数据。
来自10.10.0.1的64字节:icmp_seq = 1 ttl = 64时间= 0.058ms
来自10.10.0.1的64字节:icmp_seq = 2 ttl = 64时间= 0.037ms
互联网正常工作。
root @ us1-ps1:〜#ping google.com
PING google.com(172.217.0.46)56(84)字节的数据。
来自lga15s43-in-f14.1e100.net(172.217.0.46)的64字节:icmp_seq = 1 ttl = 51时间= 20.3ms
来自lga15s43-in-f14.1e100.net(172.217.0.46)的64字节:icmp_seq = 2 ttl = 51时间= 20.2ms
来自lga15s43-in-f14.1e100.net(172.217.0.46)的64字节:icmp_seq = 3 ttl = 51时间= 20.2ms
^ C — google.com ping statistics —发送3个数据包,接收3个数据包,丢包0%,时间2002ms rtt min / avg / max / mdev = 20.216 / 20.279 / 20.338 / 0.171 ms
默认网关也可以ping通。
让我知道你想要打印的其他信息。
谢谢
指定client-config-dir指令。 radius插件将把openvpn将要使用的文件分配给ip。
例如。 客户端configuration目录客户端