Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

VPN 

OpenVPN on a VPS

I installed OpenVPN on a VPS about 1 month ago. It worked really well for a week, then it randomly stopped working?

When I run 'service openvpn status', I get " * VPN 'server' is running". When I check if the port is open from outside connections, it says it's closed. Why has the port randomly decided to close itself?

Thanks.
Meow~ c:

Did you run the command "service iptables save" after putting the iptables portforwarding rules in?
[Image: sig-y84190q.gif]
(Feb 28, 2018 03:43 PM)StevesTrolls Wrote:  Did you run the command "service iptables save" after putting the iptables portforwarding rules in?

iptables: unrecognized service

I'll find a way to save the rules then I'll try, thanks.
Meow~ c:

(Mar 1, 2018 04:05 AM)A Kitty Wrote:  iptables: unrecognized service

I'll find a way to save the rules then I'll try, thanks.

Have a look here.... 🤝

https://hackforums.net/showthread.php?tid=5838690
(May 20, 2018 03:18 AM)SIM-3817662 Wrote:  Maybe your provider closed this port on his firewalls? Does your OpenVPN use TCP or UDP? How do you check if the port is open from outside?

OpenVPN likes from time to time to stop working, did you try just to restart the service?

I use http://canyouseeme.org/ . If the provider closed the port on their firewall, wouldn't it not work at all, instead of once? And I'm not sure if it's TCP/UDP. When it stops, I have to re-add rules, not only restart it.
Meow~ c:

Execute cmd: 'grep VPN /var/log/syslog' and paste here.
What is the configuration of ur vps - kvm or xen, how much ram does it have ?
Also show firewall rules by executin cmd: 'iptables -vn -L'
(May 20, 2018 06:09 AM)TorJacketo Wrote:  Execute cmd: 'grep VPN /var/log/syslog' and paste here.
What is the configuration of ur vps - kvm or xen, how much ram does it have ?
Also show firewall rules by executin cmd: 'iptables -vn -L'

There's no output when I execute that command. It's OpenVZ and has 2GB RAM.
Meow~ c:

(May 20, 2018 08:24 AM)A Kitty Wrote:  There's no output when I execute that command. It's OpenVZ and has 2GB RAM.
What about firewall rules, did u execute that cmd ?
U should use KVM or XEN vps hosting, coz tun/tap is always "blocked" in OpenVZ.
(Feb 27, 2018 09:36 AM)A Kitty Wrote:  I installed OpenVPN on a VPS about 1 month ago. It worked really well for a week, then it randomly stopped working?

When I run 'service openvpn status', I get " * VPN 'server' is running". When I check if the port is open from outside connections, it says it's closed. Why has the port randomly decided to close itself?

Thanks.

are you using community version or the access server?
and it looks like you ran the iptables command without sudo.
most of vz host won't block you from anything, as long as you don't generate insane amount of traffic or serverload.
pm me if you need private answers.
Try this for OpenVZ IPTables...

Or switch to KVM would be even better.

Code
iptables -F

iptables -P OUTPUT ACCEPT

iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT

iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT

iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to-source 123.45.67.89

iptables -A INPUT -p udp --dport 1194 -j ACCEPT

iptables -A INPUT -p icmp -j ACCEPT

iptables -A INPUT -i lo -j ACCEPT

iptables -A INPUT -i tun0 -j ACCEPT

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables-save


Possibly Related Threads...
Thread / Author Replies Views Last Post
by LucridJan 1, 2018 10:19 PM 3 173 Jan 1, 2018 10:19 PM
Last Post: SnoWHAX
by BloodfoldxFeb 15, 2017 01:28 AM 1 158 Feb 15, 2017 01:28 AM
Last Post: Praet0rian
by NenechiDec 28, 2016 10:34 AM 9 436 Dec 28, 2016 10:34 AM
Last Post: nicodemo