[Frage] Routing über VPN-Tunnel

Hello DualIP,
I have changed the box, now. I take my backup box W900V (AVM7570) for the test.
I entered your proposed rule

iptables -t nat -A POSTROUTING -s ! 192.168.0.0/24 -o tun1 -j SNAT --to-source 192.168.0.123

...,but still the same picture. The WEB-Server is not reachable from the internet.:(

Otto
 
Looking at routing table again: VPN tunnel is tun0 instead of tun1
 
DualIp,
you are fully right! I changed the entry to "tun0" and I test it again, but with the same result. No connection

I found in "syslog-dsdl" following line
Jan 22 12:53:30 fritz user.err dsld[1664]: internet: 192.168.12.205 not an intern host, forwardrule "tcp 0.0.0.0:80 192.168.12.205:80 0 # HTTP-Server" ignored

Otto
 
I have following routes on my 7340:
Network Subnet mask Gateway
10.0.0.0 255.0.0.0 192.168.1.11
172.16.0.0 255.240.0.0 192.168.1.11
192.168.0.0 255.255.0.0 192.168.1.11
Although 192.168.1.0/24 is fritzbox internal LAN, I can still map ports to any host in any of 3 ranges.
just tested: mapped 888 to 10.10.10.10, fritzbox NAT's to this "non internal" host, is working ok

Maybe in your case dsld isn't aware of extra route to the tunnel
try adding route 192.168.0.0 255.255.0.0 in fritzbox web interface to some host in your networkA. This might trick dsld to do natting. After passing dsld NAT, the linux route table is checked and the more specific route (VPN) is used, overruling the added route.
 
@DualIP

>>adding route 192.168.0.0 255.255.0.0 in fritzbox web interface to some host in your networkA. >>

What do you mean a "Statische IP-Route" or "Port Forwarding" on my Fritzbox?

Otto
 
fritz-gui, expert mode , chose "home network" in left menu, tab "network settings", button "ip routes"
 
Mal Deutsch, mal Englisch?

IP Route nur im selben Subnetz, VPN nur ins fremde Subnetz. Also IP Route auf VPN kannste vergessen.

Soll der TE einfach den Webserver über die DynDNS der 2. FB nehmen und gut ist. Wird nur unnötig beide FBs beansprucht und Leitung der 1. FB.
 
@DualIP
I added the route on my Fritzbox.

root@fritz:/var/mod/root# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.180.1 * 255.255.255.255 UH 2 0 0 dsl
192.168.180.2 * 255.255.255.255 UH 2 0 0 dsl
89.166.193.255 * 255.255.255.255 UH 2 0 0 dsl
192.168.179.0 * 255.255.255.0 U 0 0 0 guest
192.168.0.0 * 255.255.255.0 U 0 0 0 lan
192.168.200.0 * 255.255.255.0 U 0 0 0 tun0
192.168.12.0 192.168.200.3 255.255.255.0 UG 0 0 0 tun0
192.168.10.0 192.168.200.2 255.255.255.0 UG 0 0 0 tun0
169.254.0.0 * 255.255.0.0 U 0 0 0 lan
192.168.0.0 192.168.0.134 255.255.0.0 UG 0 0 0 lan
default * 0.0.0.0 U 2 0 0 dsl

Do I need also a port forwarding to the Web-Server in the network BoxB (192.168.12.0/24)?
Otto
 
Of course you need the port mapping. Do you still get the error "192.168.12.205 not an intern host" ?
Did you add the route in fritz gui? On my routes, I see 192.168.1.11 as next hop, instead of *

Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.180.1 * 255.255.255.255 UH 2 0 0 dsl
83.160.61.183 * 255.255.255.255 UH 2 0 0 dsl
192.168.180.2 * 255.255.255.255 UH 2 0 0 dsl
192.168.179.0 * 255.255.255.0 U 0 0 0 guest
192.168.1.0 * 255.255.255.0 U 0 0 0 lan
169.254.0.0 * 255.255.0.0 U 0 0 0 lan
192.168.0.0 192.168.1.11 255.255.0.0 UG 0 0 0 lan
172.16.0.0 192.168.1.11 255.240.0.0 UG 0 0 0 lan
10.0.0.0 192.168.1.11 255.0.0.0 UG 0 0 0 lan
default * 0.0.0.0 U 2 0 0 dsl

Soll der TE einfach den Webserver über die DynDNS der 2. FB nehmen und gut ist. Wird nur unnötig beide FBs beansprucht und Leitung der 1. FB.
That's the best solution, but the topic title is routing uber vpn tunnel......
 
@DualIP
Yes, I still get the error "...192.168.12.205 not an intern host, forwardrule "tcp 0.0.0.0:80 192.168.12.205:80 0 # HTTP-Server" ignored"

Yes, I added the route via the fritz gui! (IP-Netzwerk: 192.168.0.0; Subnetzmaske: 255.255.0.0; Gateway: 192.168.0.134)

-----
Soll der TE einfach den Webserver über die DynDNS der 2. FB nehmen und gut ist. Wird nur unnötig beide FBs beansprucht und Leitung der 1. FB.
-----
BoxB is connected via UMTS. Therefore it is not possible to achieve the box or the WEB-Server via DynDNS. This kind of solution isn't work in the UMTS-Network. VPN is in my point of view the single way to achieve the BoxB.
 
If dsld doesn't allow this mapping, NATting both source and destination address is needed.
In config, first map to previous used dummy addres 192.168.0.123

then use 2 iptables NAT rules:
iptables -t nat -A PREROUTING -d 192.168.0.123 -j DNAT --to-destination 192.168.12.205
iptables -t nat -A POSTROUTING -s ! 192.168.0.0/24 -o tun1 -j SNAT --to-source 192.168.0.123

If this doesn't work on fritzbox itself (It's likely packets from dsld won't hit prerouting chain) you can use those rules on physical linux host with address .123 on LanA
Even a microsoft host can be used to do this trick: look into netsh portproxy command
 
@DualIP
I am not at home, today. I will test it tomorrow.

Otto
 
Ich habe ein ähnliches Setup mit tinyproxy im Reverse only Mode erledigt, dann entfällt das Pakete-verbiegen, da die Verbdindung von Fritzbox A kommt und nicht aus dem Internet - dafür hat man im Webserverlog auch immer nur die IP der Box A:

Internet -> Box A ---> VPN ---> Linux-System m. Openvpn ---> LAN ---> Webserver

Dafür habe ich (keine Ahnung warum, lange her, dass ich das einegerichtet habe) Auf Fritzbox A noch eine Portweiterleitung über Freetz von Port 80 auf 127.0.0.1:3128 gelegt, ich bin im Moment unsicher, ob das daran lag, dass ich den Port von tinyproxy nicht ändern konnte.

Die einzigen im Tinyproxy gesetzten Optionen sind ReverseOnly und ReversePath "/" "http://10.8.0.2/" (wobei 192.168.183.42 der Webserver in Netz B ist).

HTH
Danny
 
@shinebar
...Die einzigen im Tinyproxy gesetzten Optionen sind ReverseOnly und ReversePath "/" "http://10.8.0.2/" (wobei 192.168.183.42 der Webserver in Netz B ist).

Meinst Du ReversePath: "/" "http://192.168.12.205/" ?

Otto
 
@shinebar

Meinst Du ReversePath: "/" "http://192.168.12.205/" ?

Ja, klar - da hab' ich zwei Sachen gleichzeitig gemacht und die IPs vertüdelt, die IP bei http://blablubb muss natürlich die IP sein, zu der Du willst, bei Dir also die 192.168.12.205. Richtig ist meine Aussage so:

Die einzigen im Tinyproxy gesetzten Optionen sind ReverseOnly und ReversePath "/" "http://192.168.183.42/" (wobei 192.168.183.42 der Webserver in Netz B ist).
 
Zuletzt bearbeitet:
@shinebar

Super- die Lösung funktioniert!!! Jetzt ist der Web-Server Netzwerk BoxB über den DynDns-Zugang am BoxA erreichbar!!!

Danke
 
@shinebar

Super- die Lösung funktioniert!!! Jetzt ist der Web-Server Netzwerk BoxB über den DynDns-Zugang am BoxA erreichbar!!!

Danke

Klasse, freut mich! Danke für die Rückmeldung!
 
@DualIP
I tried also your last proposal, but the result is the same. It was not possible too reach the WebServer in Network BoxB.
In my opinion the way with the Tinyproxy and ReversePath is much easy as working with iptables.
Thank you very much for your support.
Otto
 
Ich möchte das gleiche wie der Threadersteller machen. Allerdings kann ich kein Freetz installieren. Höchstens telnet aufmachen und paar Sachen in der /var/flash/debug.cfg ändern könnte ich. Ist das Vorhaben überhaupt machbar ohne Freetz?
Wie müsste man tinyproxy konfigurieren? Das Binary habe ich bereits gefunden.
 
Zuletzt bearbeitet:
Zum einen, wenn es um die Box deiner Signatur geht: Für die 7390 ist das Binary nicht das richtige (du brauchst eines für Mips).

Wenn du von der "Box A" aus den Web-Server erreichen kannst, sollte der Proxy auf der Box reichen
 

Anhänge

  • tinyproxy-mips-static.gz
    102.8 KB · Aufrufe: 4

Neueste Beiträge

Statistik des Forums

Themen
244,884
Beiträge
2,220,156
Mitglieder
371,617
Neuestes Mitglied
eastman
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.

IPPF im Überblick

Neueste Beiträge