OpenVPN Server im LXC Container

anaign

New Member
Feb 20, 2018
28
0
1
53
Hallo,

echo 1 > /proc/sys/net/ipv4/ip_forward wird nicht persistent gespeichert
Wird zwar in der Datei /etc/sysctl.conf gesetzt
Nach Host reboot muss man den Eintrag
echo 1 >proc/sys/net/ipv4/ip_forward per ssh manuell setzen
Stromausfall → Kein VPN mehr :-(

Vielen Dank!

Freundliche Grüße
Aigner
 
hallo,
danke für die hilfe, hab ich schon versucht, kommt nicht nochmal vor?
lga.
 
Im Container selbst liefert er also immer das hier?

Code:
$ sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0

Paste mal bitte die Ausgabe von

Code:
$ grep -Eve '^(#|$)' /etc/sysctl.conf
 
sorry erstes Kommando

root@OpenVPN:~# sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 1
 
Hast du vielleicht noch Einträge in /etc/sysctl.d/ drin, die ip_forward enthalten?

Vielleicht mal nach ip_forward in /etc greppen?

Code:
grep -r ip_forward /etc
 
root@OpenVPN:~# grep -r ip_forward /etc
/etc/sysctl.conf:net.ipv4.ip_forward=1
/etc/ufw/sysctl.conf:#net/ipv4/ip_forward=1
/etc/openvpn/OpenVPNServerUDP1194.conf:# net.ipv4.ip_forward=1
 
Was für ein Gast-OS läuft da? Werden andere Einträge aus /etc/sysctl.conf denn korrekt gesetzt, d.h. wird sysctl beim booten überhaupt aufgerufen? Falls es was Debian-basiertes ist, würde ich noch Vorschlagen das manuell auch nochmal als post-up für eth0 in /etc/network/interfaces zu setzen und dann die Maschine mal neu zu starten um das korrekte laufen sicherzustellen.
 
kenne mich jetzt nicht ganz aus. . .
so: denke nicht oder
auto lo
iface lo inet loopback
iface lo inet6 loopback

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto eth0
net.ipv4.ip_forward=1
0 inet dhcp

Maschine kommt nicht hoch . . .
 
Das hier steht z.B. bei mir drin:

Code:
auto eth0
iface eth0 inet static
        address 192.168.1.251
        netmask 255.255.255.0
        gateway 192.168.1.1
        post-up sysctl -w net.ipv4.ip_forward=1
 
### FUNKTIONIERT ###
vielen vielen Dank für die Hilfe, kann ich das auch so in der stehen lassen oder ist das ein nogo
post-up sysctl -w net.ipv4.ip_forward=1

danke nochmal

Jetzt bleibt noch mein FreeNAS Problem
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!