[OpenWrt-Devel] proto 'none' overwriting tun interfaces
openwrt at a.gnslr.us
openwrt at a.gnslr.us
Mon Oct 12 20:16:28 EDT 2015
Hi all,
I've been compiling OpenWRT builds for my home router (Netgear WNDR3800 and now a WD MyNet N750) for a number of years. I just recently encountered a problem with the OpenVPN tun interfaces are showing up without IP addresses after a reboot. I have the following in my /etc/config/network:
config interface 'vpn_udp'
option ifname 'tun0'
option proto 'none'
config interface 'vpn_tcp'
option ifname 'tun1'
option proto 'none'
Then, my /etc/openvpn/udp.ovpn and /etc/openvpn/tcp.ovpn reference "dev tun0" and "dev tun1", respectively. I do it this way so I can link "vpn_udp" and "vpn_tcp" into /etc/config/firewall, and other places, like I would any other network interface. What I expect is that the tun0 and tun1 interfaces look like this after a reboot:
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.28.10.1 P-t-P:10.28.10.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)
tun1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.28.11.1 P-t-P:10.28.11.1 Mask:255.255.255.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:253526 errors:0 dropped:0 overruns:0 frame:0
TX packets:356519 errors:0 dropped:834 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:16948392 (16.1 MiB) TX bytes:451900041 (430.9 MiB)
However the interfaces look like this instead:
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
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)
tun1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
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)
Note, the IP addresses are missing. Hence, even though the openvpn processes are running, traffic won't flow because the tun interfaces have had their IP addresses wiped. I have to manually run "/etc/init.d/openvpn restart" to get everything back to normal after reboot.
Am I missing something? This is happening on freshly compiled images from both the latest trunk and latest 15.05.
Any thoughts and/or suggestions would be most appreciated.
Thanks,
Adam
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list