VPN use refused connection error

Hi Community.

I Installed Wireguard in a VPS where HestiaCP is installed too. The goal is to only access hestiacp by VPN.

So in HestiaCP I go to the Firewall settings and edit the rule:
[ ACCEPT] > HESTIA > TCP > 8083 > 0.0.0.0/0 to port 10.10.10.0/24. (I suppose it’s allowing all IP in this network. I also tried with 10.10.10.2/32 which is the VPN device IP).

I get the Refuse conn error when logged in by VPN.

Am i missing something? I’ve search the forum (and internet) but with no success.
Thank you.

Hi @ncm

Please show the rules you are using:

iptables -S -t nat
iptables -S

Also your net:

ip a

Hello sahsanu, thank you for your reply.

thank you

These are the commands when i tried to set and use the VPN:

Difference between the two files:

out:

-A INPUT -p tcp -m tcp --dport 8083 -j ACCEPT

in:

-A OUTPUT -d 10.13.13.2/32 -p tcp -m tcp --sport 8083 -j ACCEPT
-A fail2ban-MAIL -s 103.194.88.65/32 -j REJECT --reject-with icmp-port-unreachable

Are you sure you configured wireguard correctly? I mean, the iptables rules to do postrouting and forward. Also, I don’t see any wireguard interface…

Thank you sahsanu, the problem was related with hosts file misconfiguration.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.