tobipicomputers
New Member
Hello,
I have a tricky but actually simple problem.
I would like to run traffic from and to a Raspberry Pi through my Netcup server. So network traffic as well as web traffic. My Netcup server has an identifiable address and can be pinged everywhere. I want to have this on my Raspi too. For this I want to configure OpenVPN so that the connection is up (Pi <-> server). So my Pi is the cient and my server (Netcup) is my server (or host).
So here is some code for you guys:
For meaning: tobipiserver = Netcupserver and RaspiMum = Raspbery Pi.
server.config:
# OpenVPN Port, Protocol, and the Tun
port 16661
proto udp
dev tun
# OpenVPN Server Certificate - CA, server key and certificate
ca /etc/openvpn/server/ca.crt
cert /etc/openvpn/server/tobipiserver.crt
key /etc/openvpn/server/tobipiserver.key
#DH and CRL key
dh /etc/openvpn/server/dh.pem
#crl-verify /etc/openvpn/server/crl.pem
# Network Configuration - Internal network
# Redirect all Connection through OpenVPN Server
server 172.16.31.0 255.255.255.0
#push "redirect-gateway def1"
route 192.168.178.geschwärtzt 255.255.255.0
route 192.168.178.39 255.255.255.0
push "route 192.168.178.39 (thats the ip adress of my pi)) 255.255.255.0"
# Using the DNS from https://dns.watch
# push "dhcp-option DNS 84.200.69.80"
push "push 192.168.178.geschwärzt 255.255.255.0"
#Enable multiple clients to connect with the same certificate key !! Hinweis nu$
#duplicate-cn
# TLS Security
cipher AES-256-CBC
tls-version-min 1.2
tls-cipher (blacked out)
auth SHA512
auth-nocache
# Other Configuration
keepalive 20 60
persist-key
persist-tun
compress lz4
#daemon
user nobody
group nogroup
# OpenVPN Log
log-append /var/log/openvpn.log
verb 3
hier meine client.conf:
client
dev tun
proto udp
remote geschwärzte IP Netcup Server 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
ca /etc/openvpn/client/ca.crt
cert /etc/openvpn/client/RaspiMum.crt
key /etc/openvpn/client/RaspiMum.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-C0
Data of my devices:
Linux RaspiMum 5.4.79-v7l+
Server:
OS: Debian GNU/Linux 10 (buster) x86_64
Host: KVM Server VPS 200 G8
Kernel: 4.19.0-11-amd64
CPU: QEMU Virtual version 2.5+ (1) @ 2.294GHz
Memory: 209MiB / 1995MiB
So but now does not work, the connection can not be established, I can only reach the Netcup server (logical, pay for it 3€ / month with access data). So what to do?
I have a tricky but actually simple problem.
I would like to run traffic from and to a Raspberry Pi through my Netcup server. So network traffic as well as web traffic. My Netcup server has an identifiable address and can be pinged everywhere. I want to have this on my Raspi too. For this I want to configure OpenVPN so that the connection is up (Pi <-> server). So my Pi is the cient and my server (Netcup) is my server (or host).
So here is some code for you guys:
For meaning: tobipiserver = Netcupserver and RaspiMum = Raspbery Pi.
server.config:
# OpenVPN Port, Protocol, and the Tun
port 16661
proto udp
dev tun
# OpenVPN Server Certificate - CA, server key and certificate
ca /etc/openvpn/server/ca.crt
cert /etc/openvpn/server/tobipiserver.crt
key /etc/openvpn/server/tobipiserver.key
#DH and CRL key
dh /etc/openvpn/server/dh.pem
#crl-verify /etc/openvpn/server/crl.pem
# Network Configuration - Internal network
# Redirect all Connection through OpenVPN Server
server 172.16.31.0 255.255.255.0
#push "redirect-gateway def1"
route 192.168.178.geschwärtzt 255.255.255.0
route 192.168.178.39 255.255.255.0
push "route 192.168.178.39 (thats the ip adress of my pi)) 255.255.255.0"
# Using the DNS from https://dns.watch
# push "dhcp-option DNS 84.200.69.80"
push "push 192.168.178.geschwärzt 255.255.255.0"
#Enable multiple clients to connect with the same certificate key !! Hinweis nu$
#duplicate-cn
# TLS Security
cipher AES-256-CBC
tls-version-min 1.2
tls-cipher (blacked out)
auth SHA512
auth-nocache
# Other Configuration
keepalive 20 60
persist-key
persist-tun
compress lz4
#daemon
user nobody
group nogroup
# OpenVPN Log
log-append /var/log/openvpn.log
verb 3
hier meine client.conf:
client
dev tun
proto udp
remote geschwärzte IP Netcup Server 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
ca /etc/openvpn/client/ca.crt
cert /etc/openvpn/client/RaspiMum.crt
key /etc/openvpn/client/RaspiMum.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-C0
Data of my devices:
Linux RaspiMum 5.4.79-v7l+
Server:
OS: Debian GNU/Linux 10 (buster) x86_64
Host: KVM Server VPS 200 G8
Kernel: 4.19.0-11-amd64
CPU: QEMU Virtual version 2.5+ (1) @ 2.294GHz
Memory: 209MiB / 1995MiB
So but now does not work, the connection can not be established, I can only reach the Netcup server (logical, pay for it 3€ / month with access data). So what to do?