d3vilh / openvpn-aws

OpenVPN and OpenVPN-UI for any Cloud or x86 bare metal instance
Apache License 2.0
113 stars 24 forks source link

Fresh installation, openvpn server won't start #7

Closed jannoke closed 6 months ago

jannoke commented 6 months ago

I made fresh install on debian 12 and openvpn-aws. But seems openvpn server is not starting. I did not edit any configuration files. Just ran the commands shown for setting it up to test it as proof of concept. Got ui running at port 8080 and it works. But openvpn docker wont start.

Snippet on the end of log:


net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
Configuring iptables...
NAT for OpenVPN clients
Blocking ICMP for external clients
Blocking internal home subnet to access from external openvpn clients (Internet still available)
No additional firewall rules to apply.
IPT MASQ Chains:
MASQUERADE  all  --  10.0.70.0/24         anywhere
MASQUERADE  all  --  10.0.71.0/24         anywhere
IPT FWD Chains:
       0        0 DROP       1    --  *      *       10.0.71.0/24         0.0.0.0/0            icmptype 8
       0        0 DROP       1    --  *      *       10.0.71.0/24         0.0.0.0/0            icmptype 0
       0        0 DROP       0    --  *      *       10.0.71.0/24         192.168.88.0/24
Start openvpn process...
Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/server.conf
Use --help for more information.
EasyRSA path: /usr/share/easy-rsa OVPN path: /etc/openvpn
PKI already set up.
Following EASYRSA variables were set during CA init:
 EASYRSA_DN "org"
 EASYRSA_REQ_COUNTRY "UA"
 EASYRSA_REQ_PROVINCE "KY"
 EASYRSA_REQ_CITY "Kyiv"
 EASYRSA_REQ_ORG "SweetHome"
 EASYRSA_REQ_EMAIL "sweet@home.net"
 EASYRSA_REQ_OU "MyOrganizationalUnit"
 EASYRSA_REQ_CN "server"
 EASYRSA_KEY_SIZE 2048
 EASYRSA_CA_EXPIRE 3650
 EASYRSA_CERT_EXPIRE 825
 EASYRSA_CERT_RENEW 30
 EASYRSA_CRL_DAYS 180
Configuring networking rules...
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1
net.ipv4.ip_forward = 1

It spamms like crazy on the last command and loops around.

d3vilh commented 6 months ago

Hi @jannoke As per the logs its can't find your server.conf file and I know why - the latest commit with server.conf relocation has not been merged from dev to main branch.

Thanks to you, it is now done. Please fetch all the latest changes (git pull origin master --force) and run the playbook again. All should works fine.

jannoke commented 6 months ago

Thanks. I was able to run it no problem after that.