I have created an openvpn interface on my EdgeRouter ER-X, using port 1194.
I am having an issue with the firewall side of it however.
I created a rule on the interface eth0/local for port 1194 that will accept established and new UDP packets, but when I try to connect to my VPN from the outside, it is not letting traffic in. I cannot connect to my server at all.
However, if I change the interface for the rule to be eth0/in, I can connect just fine, without any issues.
This seems backwards to me. I am not connecting to a device running openvpn behind the router, I am connect to the router itself with an openvpn interface.
Below is my config that does not work:
firewall { all-ping enable broadcast-ping disable ipv6-receive-redirects disable ipv6-src-route disable ip-src-route disable log-martians enable name lan_in { default-action drop description "from internet to lan" rule 1 { action accept description "allow established and related" log disable protocol all state { established enable invalid disable new disable related enable } } } name router_in { default-action drop description "from internet to router" rule 1 { action accept description "allow established and related" log disable protocol all state { established enable invalid disable new disable related enable } } rule 2 { action accept description "allow ICMP from anywhere" log disable protocol icmp } rule 3 { action accept description "allow openvpn" log disable protocol udp source { port 1194 } state { established enable invalid disable new enable related disable } } } receive-redirects disable send-redirects enable source-validation disable syn-cookies enable } interfaces { ethernet eth0 { address dhcp description internet duplex auto firewall { in { name lan_in } local { name router_in } } speed auto } ethernet eth1 { duplex auto speed auto } ethernet eth2 { duplex auto speed auto } ethernet eth3 { duplex auto speed auto } ethernet eth4 { duplex auto speed auto } loopback lo { } openvpn vtun0 { config-file /config/xxx.conf description "xxx vpn" } switch switch0 { address 10.1.10.254/24 description universal mtu 1500 switch-port { interface eth1 { } interface eth2 { } interface eth3 { } interface eth4 { } vlan-aware disable } } } port-forward { auto-firewall enable hairpin-nat disable wan-interface eth0 } service { dhcp-server { disabled false hostfile-update disable shared-network-name universal { authoritative disable subnet 10.1.10.0/24 { default-router 10.1.10.254 dns-server 10.1.10.254 lease 86400 start 10.1.10.2 { stop 10.1.10.253 } } } } dns { forwarding { cache-size 150 listen-on eth0 listen-on switch0 } } gui { http-port 80 https-port 443 older-ciphers enable } nat { rule 5000 { description "universal internet access" log disable outbound-interface eth0 protocol all type masquerade } } ssh { port 22 protocol-version v2 } } system { host-name universalfw login { user xxx { authentication { encrypted-password xxx plaintext-password "" } level admin } } name-server 8.8.8.8 name-server 8.8.4.4 ntp { server 0.ubnt.pool.ntp.org { } server 1.ubnt.pool.ntp.org { } server 2.ubnt.pool.ntp.org { } server 3.ubnt.pool.ntp.org { } } syslog { global { facility all { level notice } facility protocols { level debug } } } time-zone America/Detroit } /* Warning: Do not remove the following line. */ /* === vyatta-config-version: "config-management@1:conntrack@1:cron@1:dhcp-relay@1:dhcp-server@4:firewall@5:ipsec@5:nat@3:qos@1:quagga@2:system@4:ubnt-pptp@1:ubnt-util@1:vrrp@1:webgui@1:webproxy@1:zone-policy@1" === */ /* Release version: v1.8.5.4884695.160608.1057 */
Any help is greatly appreciated.
Thanks!