Commit 0d38f08e authored by mehdi's avatar mehdi

Repairing login issue created by iptable rules + key creation issue because of permissions

parent 23aa3410
......@@ -10,6 +10,7 @@ RUN apt-get install -y openvpn easy-rsa iptables
RUN mkdir -p /app/code
WORKDIR /app/code
RUN make-cadir /app/code/easyrsa
RUN chmod +rx /app/code/easyrsa
## Installing web-admin interface & packaging scripts
ADD package.json /app/code/
......@@ -18,7 +19,7 @@ RUN npm install --production
ADD src /app/code/src
ADD app /app/code/app
ADD start.sh server.js openvpn-conf.sh iptables.rules /app/code/
ADD start.sh server.js openvpn-conf.sh /app/code/
RUN chmod +x start.sh openvpn-conf.sh
RUN mkdir -p /app/data
......
/* global superagent, $, Vue, filesize */
/* global superagent, $, Vue */
(function () {
'use strict'
......@@ -90,7 +90,7 @@
this.createKeyError = 'Invalid device name'
return
}
if (result && result.statusCode !== 201) return console.error('Error creating directory: ', result.statusCode)
if (result && result.statusCode !== 201) return console.error('Error creating device: ', result.statusCode)
if (error) return console.error(error)
this.createKeyData = ''
......
*raw
:PREROUTING ACCEPT [26181:2443991]
:OUTPUT ACCEPT [34944:5740522]
COMMIT
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
COMMIT
*mangle
:PREROUTING ACCEPT [26181:2443991]
:INPUT ACCEPT [26181:2443991]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [34944:5740522]
:POSTROUTING ACCEPT [34944:5740522]
COMMIT
*filter
:INPUT ACCEPT [26181:2443991]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [34944:5740522]
COMMIT
......@@ -41,7 +41,7 @@ fi
./openvpn-conf.sh > /run/openvpn.conf
# Add iptables rules for NATing VPN traffic
iptables-restore < iptables.rules
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
# Fix permissions
chown -R cloudron:cloudron /app/data /tmp /run
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment