OpenVPN on same machine

I want to run OpenVPN on same machine that runs Webthings but when I open SSL site through VPN it somehow serves the same certificate as on my xxx.mozilla-iot.org domain and it says the connection is not private.
I tried port 8080 and 8081 but the result is the same.
Do I need to configure something in Webthings also?

The gateway should not interfere with your VPN. By default, the gateway listens on ports 8080 and 4443. On the Raspberry Pi, we also set up iptables rules that forward 80->8080 and 443->4443, so maybe that’s what you’re having issues with?

Yes I’m using Raspberry Pi. Any suggestions how to solve it?

To remove the iptables rules, you could try doing this:

sudo update-rc.d -f gateway-iptables remove

Then, reboot the RPi.

It didn’t work.
Iptables -S:
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -i eth0 -p udp -m udp --dport 8081 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 4443 -m mark --mark 0x1 -j A CCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -m mark --mark 0x1 -j A CCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 4443 -m mark --mark 0x1 -j A CCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -m mark --mark 0x1 -j A CCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 4443 -m mark --mark 0x1 -j A CCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080 -m mark --mark 0x1 -j A CCEPT

You can try to manually delete all of those rules and start fresh.

After deleting all rules and reinstalling OpenVPN it started to work, thanks!