Hi,
I'm sorry if this was answered elsewhere already, I couldn't find anything to this. I want to connect remotely to a Raspberry Pi serving OpenVPN on my DMZ. The Port Forwarding is set and on a remote host an nmape gives me the following result:
PORT STATE SERVICE VERSION
54449/udp open|filtered unknown
Yet when I try to connect I get a timeout message. I'd like to know whether the rules I have applied are fine and my OVPN setup has issues or I've missed to create/edit necessary rules. I'm new to OpenWRT, but from first glance everything looks fine to me.
My setup:
TP-Link Archer C7 (v2 1750) with OpenWrt (18.06.1 r7258-5eb055306f / LuCI openwrt-18.06 branch (git-18.228.31946-f64b152)) and Raspberry Pi 3 Model B+ running Raspbian 9/Stretch with OpenVPN 2.4
ISP --- (WAN) OpenWRT --- LAN/DMZ/Guest
I get a genuine IPv4 and IPv6 address via FTTH, no DS-Lite or other stuff. DynDNS is already set up and working as well.
I can't upload more than one image, I hope this imgur link is working for you all: My Setup
Switch:
VLAN 3 is my DMZ where my Raspberry Pi sits. VLAN 7 is my FTTH connection.
Firewall:
config defaults
option syn_flood '1'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'REJECT'
option family 'ipv4'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option network 'lan'
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
option network 'wan wan6'
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 'guest_wifi'
option forward 'REJECT'
option output 'ACCEPT'
option network 'guest_wifi'
option input 'REJECT'
config forwarding
option dest 'wan'
option src 'guest_wifi'
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option dest_port '53'
option name 'Allow_Guest_DNS'
option src 'guest_wifi'
option dest 'dmz'
option dest_ip '192.168.99.3'
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option dest_port '67-68'
option name 'Allow_Guest_DHCP'
option src 'guest_wifi'
config zone
option name 'dmz'
option forward 'REJECT'
option output 'ACCEPT'
option network 'DMZ'
option input 'REJECT'
option log '1'
config forwarding
option dest 'wan'
option src 'dmz'
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option dest_port '53'
option name 'Allow_DMZ_DNS'
option dest_ip '192.168.99.1'
option src 'dmz'
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option dest_port '67-68'
option name 'Allow_DMZ_DHCP'
option src 'dmz'
config rule
option target 'ACCEPT'
option name 'Allow_DMZ_ICMP'
option proto 'icmp'
option icmp_type 'echo-reply'
option src 'dmz'
option dest_ip '192.168.99.1'
config rule
option target 'ACCEPT'
option dest_port '22'
option name 'Allow_DMZ_SSH'
option proto 'tcp udp'
option src 'lan'
option dest 'dmz'
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option dest_port '53'
option dest_ip '192.168.99.3'
option src 'lan'
option name 'Allow_DNS_LAN_TO_DMZ'
option dest 'dmz'
config rule
option target 'ACCEPT'
option proto 'tcp udp'
option dest_port '53'
option name 'Allow_DNS_Guest_TO_DMZ'
option src 'guest_wifi'
option dest 'dmz'
option dest_ip '192.168.99.3'
config forwarding
option dest 'dmz'
option src 'guest_wifi'
config forwarding
option dest 'dmz'
option src 'lan'
config redirect
option target 'DNAT'
option src 'wan'
option dest 'dmz'
option proto 'udp'
option src_dport '54449'
option dest_ip '192.168.99.3'
option dest_port '54449'
option name 'Allow_OVPN'
My VPN clients will get IP leases in the 10.8.0.0/24 net, everything else is on different 192.168.x.x subnets.
I thought the last firewall rule would make the trick, but apparently it does not. Does anyone of you have tips what may be wrong here?
Every tutorial or documentation I can find on the net either describes configuring OpenVPN on the router itself or on another device but without an OpenWRT setup.
Thank you for your help.
Kind regards
Mamue