Pi-Hole and OpenVPN Server on TCP Port 443 Issue

Hello there. This isn't exactly a Pi-Hole issue. Is it possible to configure the OpenVPN server to ignore connection requests from certain IP addresses? For example, my local network has IP addresses in the range of 192.168.0.0/24, and the OpenVPN server has the address 192.168.0.120. If the device with IP address of 192.168.0.170 tries to connect to the OpenVPN server, the server would just ignore that request.

The reason I want that configuration is because I have both OpenVPN server (VPN server running on TCP port 443) and Pi-Hole installed on my Raspberry Pi, and whenever I browse an HTTPS website I get the following

Sat Nov 19 22:45:57 2016 192.168.0.170:50181 Connection reset, restarting [0] Sat Nov 19 22:45:57 2016 TCP connection established with [AF_INET]192.168.0.170:50182 Sat Nov 19 22:45:57 2016 192.168.0.170:50182 WARNING: Bad encapsulated packet length from peer (5635), which must be > 0 and <= 1560 -- please ensure that --tun-mtu or --link-mtu is equal on both peers -- this condition could also indicate a possible active attack on the TCP link -- [Attempting restart...] Sat Nov 19 22:45:57 2016 192.168.0.170:50182 Connection reset, restarting [0] Sat Nov 19 22:45:57 2016 TCP connection established with [AF_INET]192.168.0.170:50183 Sat Nov 19 22:45:57 2016 192.168.0.170:50183 WARNING: Bad encapsulated packet length from peer (5635), which must be > 0 and <= 1560 -- please ensure that --tun-mtu or --link-mtu is equal on both peers -- this condition could also indicate a possible active attack on the TCP link -- [Attempting restart...]

Thanks in advance.

Never mind. I solved it by having the OpenVPN server running on port 1194 while port forwarding 443 from WAN to port 1194 of the RaspberryPi.

1 Like