大网数据广告活动
服务器运维问答

Assign static IPs to tap clients in pfSense's OpenVPN server

· 52CE 我爱测

I am trying to set up a pfSense server with OpenVPN. The OpenVPN will use the tap interface, tun clients are no option for us. The LAN network is 10.0.0.0/24 , the pfSense machine is 10.0.0.10 and clients DHCP range is currently …

问题原文

原帖链接 · Izzy · CC BY-SA 3.0

I am trying to set up a pfSense server with OpenVPN.

The OpenVPN will use the tap interface, tun clients are no option for us.

The LAN network is 10.0.0.0/24, the pfSense machine is 10.0.0.10 and clients DHCP range is currently 10.0.0.200-10.0.0.220.

The clients connect just fine with DHCP and can use the network.

I have tried to assign static IPs with the client specific overrides in pfSense. I used the commonly advised ifconfig-push command, but the clients I tested with(Windows 8 and Arch Linux) just don't take the IP assigned in their respective override. I've tried ifconfig-push with different arguments(client-IP + server, client-IP + subnet mask, ..).

If I leave the DHCP for the tap-interface on, clients will take an IP address from the client DHCP range, if I switch DHCP off clients don't get an IP at all. I have tried to push the static IP inside and outside of the DHCP range.

Is there any way to make the override work and force the assigned IP to the client? I would need this especially for access limitations with pfSense's firewall.

已采纳解答

原帖链接 · Izzy · CC BY-SA 3.0

After some deep digging I found a bug in pfSense's Redmine tracker. This states that the OpenVPN server is missing the client-config-dir variable.

Adding

mode server;client-config-dir /var/etc/openvpn-csc;

to the advanced server options as well as providing the client specific override

ifconfig-push [IP] [netmask]

did the trick.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-05-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。