iptables - Reply Forwarding Error / Destination unreachable (Host unreachable)



  • Hallo,

    Ich möchte eine VNC-Verbindung von einem PC (VNC-Client) über ein Raspberry PI (Gateway mit zwei Netzwerkschnittstellen) zun einer SPS (VNC-Server) routen.

    VNC Port: >= TCP 5900

    Mein Netzwerkausbau:

    PC/VNC-Client (192.168.56.48) VNC Client <-->
    RaspberryPI (eth1:192.168.70.197) - RaspberryPI (eth0:10.0.0.2) <-->
    SPS/VNC-Server (10.0.0.1).

    Auf dem Raspberry Pi läuft Raspian. Ích nutze iptables zum einstellen der Routen. Für einen ersten Test habe ich versucht ICMP zu routen. Meine Routingbefehle:

    LOCAL_IFACE = eth0
    INET_IFACE = eth1
    INET_ADDRESS = 192.168.70.197
    LOCAL_ADDRESS = 10.0.0.2

    #PC-->SPS
    iptables -t nat -A POSTROUTING -o $LOCAL_IFACE -j MASQUERADE
    iptables -A FORWARD -i $INET_IFACE -m state --state NEW -j ACCEPT
    iptables -t nat -A PREROUTING -p icmp -i $INET_IFACE -j DNAT --to-destination 10.0.0.1

    #PC<--SPS
    iptables -t nat -A POSTROUTING -o $INET_IFACE -j MASQUERADE
    iptables -A FORWARD -i $LOCAL_IFACE -o $INET_IFACE -j ACCEPT
    iptables -t nat -A PREROUTING -p icmp -i $LOCAL_IFACE -o $INET_IFACE -j DNAT --to-destination 192.168.56.48

    Wireshark (Raspberry PI eth0 & eth1 filter: icmp):

    No. Time Source Destination Protocol Length Info
    21 4.538921000 192.168.56.48 192.168.70.197 ICMP
    74 Echo (ping) request id=0x0001, seq=21/5376, ttl=127

    No. Time Source Destination Protocol Length Info
    25 4.540118000 10.0.0.2 10.0.0.1 ICMP
    74 Echo (ping) request id=0x0001, seq=21/5376, ttl=126

    No. Time Source Destination Protocol Length Info
    26 4.540710000 10.0.0.1 10.0.0.2 ICMP
    74 Echo (ping) reply id=0x0001, seq=21/5376, ttl=64

    No. Time Source Destination Protocol Length Info
    32 7.533461000 10.0.0.2 10.0.0.1 ICMP
    102 Destination unreachable (Host unreachable)
    <--------------------------???????????

    No. Time Source Destination Protocol Length Info
    69 9.489564000 192.168.56.48 192.168.70.197 ICMP
    74 Echo (ping) request id=0x0001, seq=22/5632, ttl=127

    No. Time Source Destination Protocol Length Info
    71 9.489905000 10.0.0.2 10.0.0.1 ICMP
    74 Echo (ping) request id=0x0001, seq=22/5632, ttl=126

    No. Time Source Destination Protocol Length Info
    72 9.490534000 10.0.0.1 10.0.0.2 ICMP
    74 Echo (ping) reply id=0x0001, seq=22/5632, ttl=64

    No. Time Source Destination Protocol Length Info
    86 12.483500000 10.0.0.2 10.0.0.1 ICMP
    102 Destination unreachable (Host unreachable)
    <-----------------------------???????????

    Meine Fragen:

    Warum wird die Ping Antwort der SPS nicht von der SPS zum PC geroutet ?
    Wie kann ich eine VNC Verbindung mit dynamischer PC IP routen?

    Danke für eure Hilfe
    Andre



  • Dieser Thread wurde von Moderator/in nman aus dem Forum Linux/Unix in das Forum Themen rund um die IT verschoben.

    Im Zweifelsfall bitte auch folgende Hinweise beachten:
    C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?

    Dieses Posting wurde automatisch erzeugt.


Anmelden zum Antworten