DS-Lite (Glasfaser) über Fritzbox 7490 auf Raspberry mit ubuntu 16.06 Openvpn / Port nicht erreichbar

Alles Rund um die Einrichtung unserer IPv6 Portmapper
Post Reply
Steve_H
Posts: 5
Joined: Thu 28. Jun 2018, 10:48

DS-Lite (Glasfaser) über Fritzbox 7490 auf Raspberry mit ubuntu 16.06 Openvpn / Port nicht erreichbar

Post by Steve_H »

Hallo zusammen,

ich brauche mal einen Tipp.

Folgende Konfiguration:

- DS-Lite Anschluss (Glasfaser)
- Fritzbox 7490 mit aktueller Labor Firmware
- Raspberry Pi mit Ubuntu 16.06 Server und Openvpn.

Ziel: Fernzugriff auf mein Heimnetzwerk
Fehler: Feste-IP gibt bei einem Test aus "Port nicht erreichbar!"

Ein Netstat -a gibt mir auf dem raspberry diesen Eintrag:
tcp6 0 0 [::]:openvpn [::]:* LISTEN

Somit müsste der Port ja eigentlich erreichbar sein.

Freigabe in der Fritzbox erfolgt über MyFritz.
Schema: http://
Port: 1194

Der Portmapper ist auf die daraus resultierende Myfritz Adresse gesetzt.
Im Internen Zugriff auf die IPv4 Adresse des Servers funktioniert alles, komme aber von extern nicht drauf.
Außerdem schlägt eben der Port-Test fehl.

Eine weitere Freigabe (anderes Netzwerkgerät) auf https:// funktioniert einwandfrei.
Kann also eigentlich nicht an der Fritzbox liegen.

So sieht meine Openvpn server.conf aus:
SpoilerAnzeigen
#IPv6 config
server-ipv6 fd6c:62d9:XXXX::1/112
tun-ipv6
push tun-ipv6
push "route-ipv6 2000::/3"
push "redirect-gateway ipv6"

port 1194
proto tcp6-server
dev tun

#for cert revoke check
crl-verify /etc/openvpn/easy-rsa/keys/crl.pem

server 10.1.0.0 255.255.255.0
topology subnet
push "redirect-gateway def1 bypass-dhcp"

#duplicate-cn

push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"

comp-lzo adaptive
push "comp-lzo adaptive"

mssfix 0
push "mssfix 0"

#management 0.0.0.0 7000 /etc/openvpn/management-password

#duplicate-cn
keepalive 10 120
tls-timeout 160
hand-window 160

cipher AES-128-CBC
auth SHA256

#uncomment for 2.4.x feature to disable automatically negotiate in AES-256-GCM
#ncp-disable

#max-clients 300

#user nobody
#group nobody

persist-key
persist-tun

status /etc/openvpn/logs/openvpn-status.log
log-append /etc/openvpn/logs/openvpn.log

verb 2
#reneg-sec 864000
mute 3
tls-server
#script-security 3

#buffers
sndbuf 393216
rcvbuf 393216
push "sndbuf 393216"
push "rcvbuf 393216"
Für Tipps wäre ich sehr dankbar...
Last edited by Steve_H on Mon 16. Jul 2018, 16:42, edited 1 time in total.
rema
Feste-IP.Net Support
Posts: 407
Joined: Thu 5. Feb 2015, 10:24

Re: DS-Lite (Glasfaser) über Fritzbox 7490 auf Raspberry mit ubuntu 16.06 Openvpn / Port nicht erreichbar

Post by rema »

Hallo,

Das Problem scheint irgendwo auf dem PI zu sein.

Die Freigabe in der Fritzbox ist korrekt.

Test auf nicht freigegeben Port:

Code: Select all

 telnet raspberrypi.wyq*******nafy.myfritz.net 12345
Trying ...
telnet: Unable to connect to remote host: Permission denied
Test auf Port 1194

Code: Select all

 telnet raspberrypi.wyq*******nafy.myfritz.net 1194
Trying ...
telnet: Timeout
Also kommen die Datenpakete bis zum PI.
Läuft auf dem Server evtl. noch eine Firewall die den Zugriff blockiert?
Steve_H
Posts: 5
Joined: Thu 28. Jun 2018, 10:48

Re: DS-Lite (Glasfaser) über Fritzbox 7490 auf Raspberry mit ubuntu 16.06 Openvpn / Port nicht erreichbar

Post by Steve_H »

Hallo,

eine Firewall läuft meines wissens nicht.

sudo ufw status
gibt mir ein -> Status: inactive
rema
Feste-IP.Net Support
Posts: 407
Joined: Thu 5. Feb 2015, 10:24

Re: DS-Lite (Glasfaser) über Fritzbox 7490 auf Raspberry mit ubuntu 16.06 Openvpn / Port nicht erreichbar

Post by rema »

Klappt den der Zugriff auf die MyFritzadresse im LAN?
sudo iptables -L ist auch leer ?
Steve_H
Posts: 5
Joined: Thu 28. Jun 2018, 10:48

Re: DS-Lite (Glasfaser) über Fritzbox 7490 auf Raspberry mit ubuntu 16.06 Openvpn / Port nicht erreichbar

Post by Steve_H »

rema wrote: Mon 16. Jul 2018, 13:41 Klappt den der Zugriff auf die MyFritzadresse im LAN?
sudo iptables -L ist auch leer ?
Baue ich die VPN Verbindung von einem Rechner aus dem Lan auf, mit Angabe der Internen IPv4 funktioniert das.
Ändere ich die interne auf die Myfritz Adresse funktinoiert das nicht.

Im Log von OpenVPN bekomme ich:
Cannot resolve host address: raspberrypi.​wyqXXXXXXXXafy.​myfritz.​net:1194

sudo iptables -L gibt folgendes aus:
SpoilerAnzeigen
  • Chain INPUT (policy ACCEPT)
    target prot opt source destination
    XL-Firewall-1-INPUT all -- anywhere anywhere
    ufw-before-logging-input all -- anywhere anywhere
    ufw-before-input all -- anywhere anywhere
    ufw-after-input all -- anywhere anywhere
    ufw-after-logging-input all -- anywhere anywhere
    ufw-reject-input all -- anywhere anywhere
    ufw-track-input all -- anywhere anywhere

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination
    XL-Firewall-1-INPUT all -- anywhere anywhere
    ufw-before-logging-forward all -- anywhere anywhere
    ufw-before-forward all -- anywhere anywhere
    ufw-after-forward all -- anywhere anywhere
    ufw-after-logging-forward all -- anywhere anywhere
    ufw-reject-forward all -- anywhere anywhere
    ufw-track-forward all -- anywhere anywhere

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    ufw-before-logging-output all -- anywhere anywhere
    ufw-before-output all -- anywhere anywhere
    ufw-after-output all -- anywhere anywhere
    ufw-after-logging-output all -- anywhere anywhere
    ufw-reject-output all -- anywhere anywhere
    ufw-track-output all -- anywhere anywhere

    Chain XL-Firewall-1-INPUT (2 references)
    target prot opt source destination
    ACCEPT icmp -- localhost anywhere icmp any
    ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
    ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
    ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:openvpn
    ACCEPT all -- anywhere anywhere
    REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

    Chain ufw-after-forward (1 references)
    target prot opt source destination

    Chain ufw-after-input (1 references)
    target prot opt source destination

    Chain ufw-after-logging-forward (1 references)
    target prot opt source destination

    Chain ufw-after-logging-input (1 references)
    target prot opt source destination

    Chain ufw-after-logging-output (1 references)
    target prot opt source destination

    Chain ufw-after-output (1 references)
    target prot opt source destination

    Chain ufw-before-forward (1 references)
    target prot opt source destination

    Chain ufw-before-input (1 references)
    target prot opt source destination

    Chain ufw-before-logging-forward (1 references)
    target prot opt source destination

    Chain ufw-before-logging-input (1 references)
    target prot opt source destination

    Chain ufw-before-logging-output (1 references)
    target prot opt source destination

    Chain ufw-before-output (1 references)
    target prot opt source destination

    Chain ufw-reject-forward (1 references)
    target prot opt source destination

    Chain ufw-reject-input (1 references)
    target prot opt source destination

    Chain ufw-reject-output (1 references)
    target prot opt source destination

    Chain ufw-track-forward (1 references)
    target prot opt source destination

    Chain ufw-track-input (1 references)
    target prot opt source destination

    Chain ufw-track-output (1 references)
    target prot opt source destination
rema
Feste-IP.Net Support
Posts: 407
Joined: Thu 5. Feb 2015, 10:24

Re: DS-Lite (Glasfaser) über Fritzbox 7490 auf Raspberry mit ubuntu 16.06 Openvpn / Port nicht erreichbar

Post by rema »

Ein

Code: Select all

ping myfritzadresse
funktioniert aber im LAN?

Die aufgelöste IPv6 Adresse ist auch mit der IPv6 des PI die unter ip -a angezeigt wird identisch?
Steve_H
Posts: 5
Joined: Thu 28. Jun 2018, 10:48

Re: DS-Lite (Glasfaser) über Fritzbox 7490 auf Raspberry mit ubuntu 16.06 Openvpn / Port nicht erreichbar

Post by Steve_H »

Der Ping funktioniert, die IPv6 Adresse wird aufgelöst.

Es gibt dann aber einen "Zielhost nicht erreichbar"

Ping wird ausgeführt für raspberrypi.wyqmXXXXXXXXafy.myfritz.net [2a01:66a0:fe9d:0:ba27:ebff:XXXX:ae10] mit 32 Bytes Daten:
Zielhost nicht erreichbar.
Zielhost nicht erreichbar.
Zielhost nicht erreichbar.
Zielhost nicht erreichbar.


Der Raspberry gibt mir dieses auf ifconfig:

eth0 Link encap:Ethernet HWaddr b8:27:eb:61:ae:10
inet addr:172.23.57.213 Bcast:172.23.57.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:XXXX:ae10/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:93726 errors:0 dropped:0 overruns:0 frame:0
TX packets:13791 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7880536 (7.8 MB) TX bytes:2621333 (2.6 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)

tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.1.0.1 P-t-P:10.1.0.1 Mask:255.255.255.0
inet6 addr: fd6c:62d9:XXXX::2/112 Scope:Global
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:3364 errors:0 dropped:0 overruns:0 frame:0
TX packets:3146 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:399122 (399.1 KB) TX bytes:647297 (647.2 KB)
rema
Feste-IP.Net Support
Posts: 407
Joined: Thu 5. Feb 2015, 10:24

Re: DS-Lite (Glasfaser) über Fritzbox 7490 auf Raspberry mit ubuntu 16.06 Openvpn / Port nicht erreichbar

Post by rema »

Der Server hat keine globale IPv6 Adresse !!!

Was sagt testipv6.de von einem Windowsclient aus ?
Steve_H
Posts: 5
Joined: Thu 28. Jun 2018, 10:48

Re: DS-Lite (Glasfaser) über Fritzbox 7490 auf Raspberry mit ubuntu 16.06 Openvpn / Port nicht erreichbar

Post by Steve_H »

Es funktioniert!

Ich dachte die Globale IP vom Tun0 Interface ist ausreichend,
das scheint aber nicht so zu sein.

Ich habe den DHCP Clienten auf dem Raspberry passend konfiguriert sodass eth0 eine Globale IPv6 bekommt.

Ganz großes Dankeschön an rema für die Unterstützung!


Gruß
Post Reply