chenjuchuan 发表于 2023-12-12 10:11:17

移植OpenVpn过程中涉及到TUN/TAP问题

背景:1、OpenVpn编译并移植完毕,版本是2.3.12


2、Tun驱动单独编译(通过飞凌提供的源码)成功并移植完毕

问题:
现在终端Tun已加载,如下:
root@fl-imx6ull:/home/forlinx/OpenVpn# modinfo tun
filename:       /lib/modules/4.1.15/tun.ko
alias:          devname:net/tun
alias:          char-major-10-200
license:      GPL
author:         (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
description:    Universal TUN/TAP device driver
srcversion:   76BFC5D81936F6868C08BB1
depends:      
intree:         Y
vermagic:       4.1.15 SMP preempt mod_unload modversions ARMv7 p2v8

但是运行./openvpn --config /etc/openvpn/server.conf的时候出现错误
root@fl-imx6ull:/home/forlinx/OpenVpn# ./openvpn --config /etc/openvpn/server.conf
Options error: Unrecognized option or missing parameter(s) in /etc/openvpn/server.conf:8: server (2.3.12)
Use --help for more information.


/etc/openvpn/server.conf内容如下:
port 1194
proto tcp
dev tun
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh2048.pem
server 10.0.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "route 192.168.10.0 255.255.255.0"
push "route 10.20.50.0 255.255.255.0"
keepalive 10 120
;tls-auth /etc/openvpn/keys/ta.key 0
cipher AES-256-CBC
comp-lzo
persist-key
persist-tun
status openvpn-status.log
log-appendopenvpn.log
verb 3
script-security 3
auth-user-pass-verify /etc/openvpn/checkpsw.sh via-env
username-as-common-name
verify-client-cert none


能否给点指点???


chenjuchuan 发表于 2024-3-29 19:28:57

这个帖子很久了,有人遇到过类似问题吗?
页: [1]
查看完整版本: 移植OpenVpn过程中涉及到TUN/TAP问题