How to Install OpenVPN/WireGuard on Linksys WRT1900AC

Note that you must have a public IP address to be able to connect to your VPN server from the internet.

The wiki how-tos for OpenVPN and WireGuard rely on the OpenWrt defaults and supposed to work out of the box mostly using just copy-paste.

WireGuard is preferable for better performance and easier configuration.

1 Like

Thank you for the quick response vgaetera. I'm with AT&T, so, yes, I do have a public IP address.I have never heard of WireGuard until I read your post. Does it work pretty much the same as PuTTY?

1 Like

WireGuard is a modern VPN protocol, a better alternative to OpenVPN:
https://openwrt.org/docs/guide-user/services/vpn/wireguard/start

And you don't really need PuTTY nowadays:
https://openwrt.org/docs/guide-quick-start/sshadministration#windows_10_built-in_terminals

Sounds like it's easier. I will give it a try. Will let you know if I have any questions. Thank you vgaetera.

1 Like

Installed Wireguard. However, the WG protocol in router "Interface" is not sending or receiving signals:

image

Perhaps my public key isn't correct (the Wireguard folder shows 3 Private Keys, albeit the details show it to be a Public Key:

image

Make sure you have properly exchanged the keys and opened the firewall port.

Alternatively, you can use a scripted approach to set up a WireGuard server and generate client profiles, which can be easily imported on mobile and desktop clients.

Spent about 2 hours configuring to no avail. I guess it's time to throw in the towel and surrender. Thank you vgaetera for all your guidance. I wish I was a better learner.

1 Like

The stubbornness in me makes me want to try it again. interestingly, this time, after installing the WireGuard software, the system automatically created a WG VPN interface and named it "VPN". However, it still cannot send or receive signals. Below is my WG VPN configuration:

image

Below is my firewall setting (I have tried both LAN and WAN):

image

What other possible settings I could have done incorrectly?

This doesn't look right as you are mixing settings from both client and server how-tos.
Do you want to set up VPN client or server?

What do you want to achieve?

1 Like

I'd like to set up my router as the server.

Then set up my phones, ipad and laptop as peers.

Make sure you have a public IP address to be able to connect to your VPN server from the internet.

Hi vgaetera, how do I verify I have a valid public IP address to my VPN server from the internet? Where would I find it? All I did was copy & paste the command lines as shown - line-by-line - in OpenWRT's "WireGuard server" instructions, and the WireGuard "VPN" interface was automatically generated when I clicked on the "Network" "Interfaces" tab. I'm really confused :slightly_frowning_face:

Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have

ubus call system board; \
uci export network; uci export firewall; \
head -n -0 /etc/firewall.user; \
iptables-save -c; \
ip -4 addr ; ip -4 ro li tab all ; ip -4 ru; 
1 Like
Hi krazeh, here's the log. PureVPN is a VPN service I was using.

I have a question: how does one obtain a public IP address. I wouldn't recognize it if I saw one.

{
        "kernel": "4.14.195",
        "hostname": "OpenWrt",
        "system": "ARMv7 Processor rev 2 (v7l)",
        "model": "Linksys WRT1900AC",
        "board_name": "linksys,mamba",
        "release": {
                "distribution": "OpenWrt",
                "version": "19.07.4",
                "revision": "r11208-ce6496d796",
                "target": "mvebu/cortexa9",
                "description": "OpenWrt 19.07.4 r11208-ce6496d796"
        }
}
package network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fdd1:3803:5967::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'
        list dns '8.8.8.8'
        list dns '8.8.4.4'
        list dns '208.67.222.222'
        list dns '208.67.220.220'

config interface 'wan'
        option ifname 'eth1.2'
        option proto 'dhcp'
        option metric '100'

config interface 'wan6'
        option ifname 'eth1.2'
        option proto 'dhcpv6'
        option metric '100'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '4 6t'

config interface 'vpn'
        option proto 'wireguard'
        option private_key 'aEspP2fdwDVVPLhBUCM7Eu4IWkKxL774injri/n4TW4='
        option listen_port '51820'
        list addresses '192.168.9.1/24'
        list addresses 'fdf1:e8a1:8d3f:9::1/64'

config wireguard_vpn 'wgclient'
        option public_key 'ZkzJZAolqYaM3POD0DcOmrrektnkR5/gV5iDdtdiNGk='
        option persistent_keepalive '25'
        list allowed_ips 'fdf1:e8a1:8d3f:9::2/128'
        list allowed_ips '0.0.0.0/0'
        list allowed_ips '::/0'
        option preshared_key 'l+5a1zeQMHiWlBulU135AGySpw1SeDTWwqMn6Bne2WU='

package firewall

config defaults
        option syn_flood '1'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'REJECT'

config zone 'lan'
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        option network 'lan wg0'

config zone 'wan'
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        option network 'wan wan6 vpn'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
        option name 'Allow-DHCP-Renew'
        option src 'wan'
        option proto 'udp'
        option dest_port '68'
        option target 'ACCEPT'
        option family 'ipv4'

config rule
        option name 'Allow-Ping'
        option src 'wan'
        option proto 'icmp'
        option icmp_type 'echo-request'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-IGMP'
        option src 'wan'
        option proto 'igmp'
        option family 'ipv4'
        option target 'ACCEPT'

config rule
        option name 'Allow-DHCPv6'
        option src 'wan'
        option proto 'udp'
        option src_ip 'fc00::/6'
        option dest_ip 'fc00::/6'
        option dest_port '546'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-MLD'
        option src 'wan'
        option proto 'icmp'
        option src_ip 'fe80::/10'
        list icmp_type '130/0'
        list icmp_type '131/0'
        list icmp_type '132/0'
        list icmp_type '143/0'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Input'
        option src 'wan'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        list icmp_type 'router-solicitation'
        list icmp_type 'neighbour-solicitation'
        list icmp_type 'router-advertisement'
        list icmp_type 'neighbour-advertisement'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-ICMPv6-Forward'
        option src 'wan'
        option dest '*'
        option proto 'icmp'
        list icmp_type 'echo-request'
        list icmp_type 'echo-reply'
        list icmp_type 'destination-unreachable'
        list icmp_type 'packet-too-big'
        list icmp_type 'time-exceeded'
        list icmp_type 'bad-header'
        list icmp_type 'unknown-header-type'
        option limit '1000/sec'
        option family 'ipv6'
        option target 'ACCEPT'

config rule
        option name 'Allow-IPSec-ESP'
        option src 'wan'
        option dest 'lan'
        option proto 'esp'
        option target 'ACCEPT'

config rule
        option name 'Allow-ISAKMP'
        option src 'wan'
        option dest 'lan'
        option dest_port '500'
        option proto 'udp'
        option target 'ACCEPT'

config include
        option path '/etc/firewall.user'

config zone
        option name 'PureVPN'
        option mtu_fix '1'
        option input 'REJECT'
        option forward 'REJECT'
        option masq '1'
        option output 'ACCEPT'

config forwarding
        option dest 'PureVPN'
        option src 'lan'

config zone
        option name 'Pure_fw'
        option mtu_fix '1'
        option input 'REJECT'
        option forward 'REJECT'
        option masq '1'
        option output 'ACCEPT'

config forwarding
        option dest 'Pure_fw'
        option src 'lan'

config zone
        option input 'ACCEPT'
        option forward 'REJECT'
        option name 'WG0'
        option output 'ACCEPT'

config rule
        option src '*'
        option target 'ACCEPT'
        option proto 'udp'
        option dest_port '51820'
        option name 'Allow-Wireguard-Inbound'

config rule 'wg'
        option name 'Allow-WireGuard'
        option src 'wan'
        option dest_port '51820'
        option proto 'udp'
        option target 'ACCEPT'

# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.

# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
# Generated by iptables-save v1.8.3 on Sun Oct 25 11:51:00 2020
*nat
:PREROUTING ACCEPT [3467:609126]
:INPUT ACCEPT [735:52598]
:OUTPUT ACCEPT [756:55490]
:POSTROUTING ACCEPT [22:4021]
:postrouting_PureVPN_rule - [0:0]
:postrouting_Pure_fw_rule - [0:0]
:postrouting_WG0_rule - [0:0]
:postrouting_lan_rule - [0:0]
:postrouting_rule - [0:0]
:postrouting_wan_rule - [0:0]
:prerouting_PureVPN_rule - [0:0]
:prerouting_Pure_fw_rule - [0:0]
:prerouting_WG0_rule - [0:0]
:prerouting_lan_rule - [0:0]
:prerouting_rule - [0:0]
:prerouting_wan_rule - [0:0]
:zone_PureVPN_postrouting - [0:0]
:zone_PureVPN_prerouting - [0:0]
:zone_Pure_fw_postrouting - [0:0]
:zone_Pure_fw_prerouting - [0:0]
:zone_WG0_postrouting - [0:0]
:zone_WG0_prerouting - [0:0]
:zone_lan_postrouting - [0:0]
:zone_lan_prerouting - [0:0]
:zone_wan_postrouting - [0:0]
:zone_wan_prerouting - [0:0]
[3467:609126] -A PREROUTING -m comment --comment "!fw3: Custom prerouting rule chain" -j prerouting_rule
[3228:595390] -A PREROUTING -i br-lan -m comment --comment "!fw3" -j zone_lan_prerouting
[239:13736] -A PREROUTING -i eth1.2 -m comment --comment "!fw3" -j zone_wan_prerouting
[0:0] -A PREROUTING -i vpn -m comment --comment "!fw3" -j zone_wan_prerouting
[1969:164024] -A POSTROUTING -m comment --comment "!fw3: Custom postrouting rule chain" -j postrouting_rule
[16:3589] -A POSTROUTING -o br-lan -m comment --comment "!fw3" -j zone_lan_postrouting
[1947:160003] -A POSTROUTING -o eth1.2 -m comment --comment "!fw3" -j zone_wan_postrouting
[0:0] -A POSTROUTING -o vpn -m comment --comment "!fw3" -j zone_wan_postrouting
[0:0] -A zone_PureVPN_postrouting -m comment --comment "!fw3: Custom PureVPN postrouting rule chain" -j postrouting_PureVPN_rule
[0:0] -A zone_PureVPN_postrouting -m comment --comment "!fw3" -j MASQUERADE
[0:0] -A zone_PureVPN_prerouting -m comment --comment "!fw3: Custom PureVPN prerouting rule chain" -j prerouting_PureVPN_rule
[0:0] -A zone_Pure_fw_postrouting -m comment --comment "!fw3: Custom Pure_fw postrouting rule chain" -j postrouting_Pure_fw_rule
[0:0] -A zone_Pure_fw_postrouting -m comment --comment "!fw3" -j MASQUERADE
[0:0] -A zone_Pure_fw_prerouting -m comment --comment "!fw3: Custom Pure_fw prerouting rule chain" -j prerouting_Pure_fw_rule
[0:0] -A zone_WG0_postrouting -m comment --comment "!fw3: Custom WG0 postrouting rule chain" -j postrouting_WG0_rule
[0:0] -A zone_WG0_prerouting -m comment --comment "!fw3: Custom WG0 prerouting rule chain" -j prerouting_WG0_rule
[16:3589] -A zone_lan_postrouting -m comment --comment "!fw3: Custom lan postrouting rule chain" -j postrouting_lan_rule
[3228:595390] -A zone_lan_prerouting -m comment --comment "!fw3: Custom lan prerouting rule chain" -j prerouting_lan_rule
[1947:160003] -A zone_wan_postrouting -m comment --comment "!fw3: Custom wan postrouting rule chain" -j postrouting_wan_rule
[1947:160003] -A zone_wan_postrouting -m comment --comment "!fw3" -j MASQUERADE
[239:13736] -A zone_wan_prerouting -m comment --comment "!fw3: Custom wan prerouting rule chain" -j prerouting_wan_rule
COMMIT
# Completed on Sun Oct 25 11:51:00 2020
# Generated by iptables-save v1.8.3 on Sun Oct 25 11:51:00 2020
*mangle
:PREROUTING ACCEPT [99293:99859295]
:INPUT ACCEPT [2740:285972]
:FORWARD ACCEPT [95036:99126025]
:OUTPUT ACCEPT [2564:774492]
:POSTROUTING ACCEPT [97468:99894421]
[850:49424] -A FORWARD -o eth1.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
[839:47360] -A FORWARD -i eth1.2 -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
[0:0] -A FORWARD -o vpn -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
[0:0] -A FORWARD -i vpn -p tcp -m tcp --tcp-flags SYN,RST SYN -m comment --comment "!fw3: Zone wan MTU fixing" -j TCPMSS --clamp-mss-to-pmtu
COMMIT
# Completed on Sun Oct 25 11:51:00 2020
# Generated by iptables-save v1.8.3 on Sun Oct 25 11:51:00 2020
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:forwarding_PureVPN_rule - [0:0]
:forwarding_Pure_fw_rule - [0:0]
:forwarding_WG0_rule - [0:0]
:forwarding_lan_rule - [0:0]
:forwarding_rule - [0:0]
:forwarding_wan_rule - [0:0]
:input_PureVPN_rule - [0:0]
:input_Pure_fw_rule - [0:0]
:input_WG0_rule - [0:0]
:input_lan_rule - [0:0]
:input_rule - [0:0]
:input_wan_rule - [0:0]
:output_PureVPN_rule - [0:0]
:output_Pure_fw_rule - [0:0]
:output_WG0_rule - [0:0]
:output_lan_rule - [0:0]
:output_rule - [0:0]
:output_wan_rule - [0:0]
:reject - [0:0]
:syn_flood - [0:0]
:zone_PureVPN_dest_ACCEPT - [0:0]
:zone_PureVPN_dest_REJECT - [0:0]
:zone_PureVPN_forward - [0:0]
:zone_PureVPN_input - [0:0]
:zone_PureVPN_output - [0:0]
:zone_PureVPN_src_REJECT - [0:0]
:zone_Pure_fw_dest_ACCEPT - [0:0]
:zone_Pure_fw_dest_REJECT - [0:0]
:zone_Pure_fw_forward - [0:0]
:zone_Pure_fw_input - [0:0]
:zone_Pure_fw_output - [0:0]
:zone_Pure_fw_src_REJECT - [0:0]
:zone_WG0_dest_ACCEPT - [0:0]
:zone_WG0_dest_REJECT - [0:0]
:zone_WG0_forward - [0:0]
:zone_WG0_input - [0:0]
:zone_WG0_output - [0:0]
:zone_WG0_src_ACCEPT - [0:0]
:zone_lan_dest_ACCEPT - [0:0]
:zone_lan_forward - [0:0]
:zone_lan_input - [0:0]
:zone_lan_output - [0:0]
:zone_lan_src_ACCEPT - [0:0]
:zone_wan_dest_ACCEPT - [0:0]
:zone_wan_dest_REJECT - [0:0]
:zone_wan_forward - [0:0]
:zone_wan_input - [0:0]
:zone_wan_output - [0:0]
:zone_wan_src_REJECT - [0:0]
[170:15110] -A INPUT -i lo -m comment --comment "!fw3" -j ACCEPT
[2570:270862] -A INPUT -m comment --comment "!fw3: Custom input rule chain" -j input_rule
[1410:192139] -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
[164:6820] -A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m comment --comment "!fw3" -j syn_flood
[0:0] -A INPUT -p udp -m udp --dport 51820 -m comment --comment "!fw3: Allow-Wireguard-Inbound" -j ACCEPT
[764:58468] -A INPUT -i br-lan -m comment --comment "!fw3" -j zone_lan_input
[396:20255] -A INPUT -i eth1.2 -m comment --comment "!fw3" -j zone_wan_input
[0:0] -A INPUT -i vpn -m comment --comment "!fw3" -j zone_wan_input
[95036:99126025] -A FORWARD -m comment --comment "!fw3: Custom forwarding rule chain" -j forwarding_rule
[93102:98966572] -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
[1934:159453] -A FORWARD -i br-lan -m comment --comment "!fw3" -j zone_lan_forward
[0:0] -A FORWARD -i eth1.2 -m comment --comment "!fw3" -j zone_wan_forward
[0:0] -A FORWARD -i vpn -m comment --comment "!fw3" -j zone_wan_forward
[0:0] -A FORWARD -m comment --comment "!fw3" -j reject
[170:15110] -A OUTPUT -o lo -m comment --comment "!fw3" -j ACCEPT
[2396:760678] -A OUTPUT -m comment --comment "!fw3: Custom output rule chain" -j output_rule
[1607:700802] -A OUTPUT -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "!fw3" -j ACCEPT
[25:6541] -A OUTPUT -o br-lan -m comment --comment "!fw3" -j zone_lan_output
[764:53335] -A OUTPUT -o eth1.2 -m comment --comment "!fw3" -j zone_wan_output
[0:0] -A OUTPUT -o vpn -m comment --comment "!fw3" -j zone_wan_output
[304:12559] -A reject -p tcp -m comment --comment "!fw3" -j REJECT --reject-with tcp-reset
[2:568] -A reject -m comment --comment "!fw3" -j REJECT --reject-with icmp-port-unreachable
[164:6820] -A syn_flood -p tcp -m tcp --tcp-flags FIN,SYN,RST,ACK SYN -m limit --limit 25/sec --limit-burst 50 -m comment --comment "!fw3" -j RETURN
[0:0] -A syn_flood -m comment --comment "!fw3" -j DROP
[0:0] -A zone_PureVPN_forward -m comment --comment "!fw3: Custom PureVPN forwarding rule chain" -j forwarding_PureVPN_rule
[0:0] -A zone_PureVPN_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_PureVPN_forward -m comment --comment "!fw3" -j zone_PureVPN_dest_REJECT
[0:0] -A zone_PureVPN_input -m comment --comment "!fw3: Custom PureVPN input rule chain" -j input_PureVPN_rule
[0:0] -A zone_PureVPN_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[0:0] -A zone_PureVPN_input -m comment --comment "!fw3" -j zone_PureVPN_src_REJECT
[0:0] -A zone_PureVPN_output -m comment --comment "!fw3: Custom PureVPN output rule chain" -j output_PureVPN_rule
[0:0] -A zone_PureVPN_output -m comment --comment "!fw3" -j zone_PureVPN_dest_ACCEPT
[0:0] -A zone_Pure_fw_forward -m comment --comment "!fw3: Custom Pure_fw forwarding rule chain" -j forwarding_Pure_fw_rule
[0:0] -A zone_Pure_fw_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_Pure_fw_forward -m comment --comment "!fw3" -j zone_Pure_fw_dest_REJECT
[0:0] -A zone_Pure_fw_input -m comment --comment "!fw3: Custom Pure_fw input rule chain" -j input_Pure_fw_rule
[0:0] -A zone_Pure_fw_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[0:0] -A zone_Pure_fw_input -m comment --comment "!fw3" -j zone_Pure_fw_src_REJECT
[0:0] -A zone_Pure_fw_output -m comment --comment "!fw3: Custom Pure_fw output rule chain" -j output_Pure_fw_rule
[0:0] -A zone_Pure_fw_output -m comment --comment "!fw3" -j zone_Pure_fw_dest_ACCEPT
[0:0] -A zone_WG0_forward -m comment --comment "!fw3: Custom WG0 forwarding rule chain" -j forwarding_WG0_rule
[0:0] -A zone_WG0_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_WG0_forward -m comment --comment "!fw3" -j zone_WG0_dest_REJECT
[0:0] -A zone_WG0_input -m comment --comment "!fw3: Custom WG0 input rule chain" -j input_WG0_rule
[0:0] -A zone_WG0_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[0:0] -A zone_WG0_input -m comment --comment "!fw3" -j zone_WG0_src_ACCEPT
[0:0] -A zone_WG0_output -m comment --comment "!fw3: Custom WG0 output rule chain" -j output_WG0_rule
[0:0] -A zone_WG0_output -m comment --comment "!fw3" -j zone_WG0_dest_ACCEPT
[25:6541] -A zone_lan_dest_ACCEPT -o br-lan -m comment --comment "!fw3" -j ACCEPT
[1934:159453] -A zone_lan_forward -m comment --comment "!fw3: Custom lan forwarding rule chain" -j forwarding_lan_rule
[1934:159453] -A zone_lan_forward -m comment --comment "!fw3: Zone lan to wan forwarding policy" -j zone_wan_dest_ACCEPT
[0:0] -A zone_lan_forward -m comment --comment "!fw3: Zone lan to PureVPN forwarding policy" -j zone_PureVPN_dest_ACCEPT
[0:0] -A zone_lan_forward -m comment --comment "!fw3: Zone lan to Pure_fw forwarding policy" -j zone_Pure_fw_dest_ACCEPT
[0:0] -A zone_lan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_lan_forward -m comment --comment "!fw3" -j zone_lan_dest_ACCEPT
[764:58468] -A zone_lan_input -m comment --comment "!fw3: Custom lan input rule chain" -j input_lan_rule
[0:0] -A zone_lan_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[764:58468] -A zone_lan_input -m comment --comment "!fw3" -j zone_lan_src_ACCEPT
[25:6541] -A zone_lan_output -m comment --comment "!fw3: Custom lan output rule chain" -j output_lan_rule
[25:6541] -A zone_lan_output -m comment --comment "!fw3" -j zone_lan_dest_ACCEPT
[764:58468] -A zone_lan_src_ACCEPT -i br-lan -m conntrack --ctstate NEW,UNTRACKED -m comment --comment "!fw3" -j ACCEPT
[132:6096] -A zone_wan_dest_ACCEPT -o eth1.2 -m conntrack --ctstate INVALID -m comment --comment "!fw3: Prevent NAT leakage" -j DROP
[2566:206692] -A zone_wan_dest_ACCEPT -o eth1.2 -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_wan_dest_ACCEPT -o vpn -m conntrack --ctstate INVALID -m comment --comment "!fw3: Prevent NAT leakage" -j DROP
[0:0] -A zone_wan_dest_ACCEPT -o vpn -m comment --comment "!fw3" -j ACCEPT
[0:0] -A zone_wan_dest_REJECT -o eth1.2 -m comment --comment "!fw3" -j reject
[0:0] -A zone_wan_dest_REJECT -o vpn -m comment --comment "!fw3" -j reject
[0:0] -A zone_wan_forward -m comment --comment "!fw3: Custom wan forwarding rule chain" -j forwarding_wan_rule
[0:0] -A zone_wan_forward -p esp -m comment --comment "!fw3: Allow-IPSec-ESP" -j zone_lan_dest_ACCEPT
[0:0] -A zone_wan_forward -p udp -m udp --dport 500 -m comment --comment "!fw3: Allow-ISAKMP" -j zone_lan_dest_ACCEPT
[0:0] -A zone_wan_forward -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port forwards" -j ACCEPT
[0:0] -A zone_wan_forward -m comment --comment "!fw3" -j zone_wan_dest_REJECT
[396:20255] -A zone_wan_input -m comment --comment "!fw3: Custom wan input rule chain" -j input_wan_rule
[0:0] -A zone_wan_input -p udp -m udp --dport 68 -m comment --comment "!fw3: Allow-DHCP-Renew" -j ACCEPT
[81:6804] -A zone_wan_input -p icmp -m icmp --icmp-type 8 -m comment --comment "!fw3: Allow-Ping" -j ACCEPT
[9:324] -A zone_wan_input -p igmp -m comment --comment "!fw3: Allow-IGMP" -j ACCEPT
[0:0] -A zone_wan_input -p udp -m udp --dport 51820 -m comment --comment "!fw3: Allow-WireGuard" -j ACCEPT
[0:0] -A zone_wan_input -m conntrack --ctstate DNAT -m comment --comment "!fw3: Accept port redirections" -j ACCEPT
[306:13127] -A zone_wan_input -m comment --comment "!fw3" -j zone_wan_src_REJECT
[764:53335] -A zone_wan_output -m comment --comment "!fw3: Custom wan output rule chain" -j output_wan_rule
[764:53335] -A zone_wan_output -m comment --comment "!fw3" -j zone_wan_dest_ACCEPT
[306:13127] -A zone_wan_src_REJECT -i eth1.2 -m comment --comment "!fw3" -j reject
[0:0] -A zone_wan_src_REJECT -i vpn -m comment --comment "!fw3" -j reject
COMMIT
# Completed on Sun Oct 25 11:51:00 2020
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
7: br-lan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 192.168.1.1/24 brd 192.168.1.255 scope global br-lan
       valid_lft forever preferred_lft forever
9: eth1.2@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    inet 23.121.252.202/22 brd 23.121.255.255 scope global eth1.2
       valid_lft forever preferred_lft forever
10: vpn: <POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1420 qdisc noqueue state UNKNOWN group default qlen 1000
    inet 192.168.9.1/24 brd 192.168.9.255 scope global vpn
       valid_lft forever preferred_lft forever
default via 23.121.252.1 dev eth1.2 proto static src 23.121.252.202 metric 100
23.121.252.0/22 dev eth1.2 proto static scope link metric 100
192.168.1.0/24 dev br-lan proto kernel scope link src 192.168.1.1
192.168.9.0/24 dev vpn proto kernel scope link src 192.168.9.1
broadcast 23.121.252.0 dev eth1.2 table local proto kernel scope link src 23.121.252.202
local 23.121.252.202 dev eth1.2 table local proto kernel scope host src 23.121.252.202
broadcast 23.121.255.255 dev eth1.2 table local proto kernel scope link src 23.121.252.202
broadcast 127.0.0.0 dev lo table local proto kernel scope link src 127.0.0.1
local 127.0.0.0/8 dev lo table local proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo table local proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo table local proto kernel scope link src 127.0.0.1
broadcast 192.168.1.0 dev br-lan table local proto kernel scope link src 192.168.1.1
local 192.168.1.1 dev br-lan table local proto kernel scope host src 192.168.1.1
broadcast 192.168.1.255 dev br-lan table local proto kernel scope link src 192.168.1.1
broadcast 192.168.9.0 dev vpn table local proto kernel scope link src 192.168.9.1
local 192.168.9.1 dev vpn table local proto kernel scope host src 192.168.9.1
broadcast 192.168.9.255 dev vpn table local proto kernel scope link src 192.168.9.1
0:      from all lookup local
32766:  from all lookup main
32767:  from all lookup default
root@OpenWrt:~#
1 Like

Please, next time remove 'sensitive' data like keys.

So you want to run OpenVPN-client to PureVPN, and VPN-server at the same time?

Please, give output of

ip a s

1 Like

Fix firewall zones:

uci -q delete firewall.lan.network
uci add_list firewall.lan.network="lan"
uci add_list firewall.lan.network="vpn"
uci -q delete firewall.wan.network
uci add_list firewall.wan.network="wan"
uci add_list firewall.wan.network="wan6"
uci commit firewall
/etc/init.d/firewall restart

Hi ulmwind, no, I'd like to just stay away from using OpenVPN and PureVPN and stick with WireGuard only.

Hi vgaetera, I entered the commands and rebooted. But WireGuard VPN still shows as not sending or receiving signals.

image

1 Like