Error: redefinition of symbol 'vpn_devices'

I want to create an OpenVPN client connection.
I did the following:

Reset the modem to factory settings.

Connected via SSH and entered the following commands:

uci set network.vpn0=interface
uci set network.vpn0.ifname=tun0
uci set network.vpn0.proto=none
uci set network.vpn0.auto=1

uci set firewall.vpn=zone
uci set firewall.vpn.name=vpn
uci set firewall.vpn.network=vpn0
uci set firewall.vpn.input=ACCEPT
uci set firewall.vpn.forward=REJECT
uci set firewall.vpn.output=ACCEPT
uci set firewall.vpn.masq=1

uci set firewall.vpn_forwarding_lan_in=forwarding
uci set firewall.vpn_forwarding_lan_in.src=vpn
uci set firewall.vpn_forwarding_lan_in.dest=lan

uci set firewall.vpn_forwarding_lan_out=forwarding
uci set firewall.vpn_forwarding_lan_out.src=lan
uci set firewall.vpn_forwarding_lan_out.dest=vpn

uci commit network
/etc/init.d/network reload
uci commit firewall
/etc/init.d/firewall reload

And after executing the last command I received the following error:

/dev/stdin:74:9-19: Error: redefinition of symbol 'vpn_devices'
define vpn_devices = { "tun0" }

Where is my mistake?

Is there a tun0 ?

No.

ifconfig tun0
ifconfig: tun0: error fetching interface information: Device not found

Deleted all

maybe change to:
uci setnetwork.vpn0.device=tun0

No changes.

I do not use uci but here is how it should look like:
/etc/config/network:

config interface 'vpn0'
	option proto 'none'
	option device 'tun0'

/etc/config/firewall:

config zone
	option name 'ovpn_client'
	option input 'REJECT'
	option output 'ACCEPT'
	option forward 'REJECT'
	option masq '1'
	option mtu_fix '1'
	list network 'vpn0'

config forwarding
	option src 'lan'
	option dest 'ovpn_client'

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.