#!/bin/bash iptables -t nat -A PREROUTING -d mdex IP-Adresse -j DNAT --to-destination LAN IP-Adresse iptables -t nat -I POSTROUTING -s LAN IP-Adresse -o tun0 -j SNAT --to-source mdex IP-Adresse
Alternativ dazu kann der integrierte DHCP-Server des mdex Routers den angeschlossenen Endgeräten die gewünschten LAN IP-Adressen automatisch zuweisen. Die zu vergebenen IP-Adressen des integrierten DHCP-Servers können Sie den jeweiligen Endgeräten anhand der MAC-Adressen fest zuordnen. Diese Einstellungen nehmen Sie unter Network
LAN in den Konfigurationseinstellen beim DHCP Server vor. Eine Beschreibung dazu finden Sie in der jeweiligen Einrichtungsanleitung des Routers:
Einrichtungsanleitung MX510 im Kapitel 6.4 DHCP-Server einrichten
Einrichtungsanleitung MX530/MX880 im Kapitel 3.8 DHCP-Server
Einrichtungsanleitung MX560 im Kapitel 3.8 DHCP-Server
#!/bin/bash iptables -t nat -A PREROUTING -d mdexRouterLANIP -j DNAT --to-destination LANRouterIP iptables -t nat -A PREROUTING -d mdexIPEndgerät1 -j DNAT --to-destination LANIP1 iptables -t nat -A PREROUTING -d mdexIPEndgerät2 -j DNAT --to-destination LANIP2 iptables -t nat -A PREROUTING -d mdexIPEndgerät3 -j DNAT --to-destination LANIP3 iptables -t nat -A PREROUTING -d mdexIPEndgerät4 -j DNAT --to-destination LANIP4 iptables -t nat -A PREROUTING -d mdexIPEndgerät5 -j DNAT --to-destination LANIP5 iptables -t nat -A PREROUTING -d mdexIPEndgerät6 -j DNAT --to-destination LANIP6 iptables -t nat -A PREROUTING -d mdexIPEndgerät7 -j DNAT --to-destination LANIP7 iptables -t nat -A PREROUTING -d mdexIPEndgerät8 -j DNAT --to-destination LANIP8 iptables -t nat -A PREROUTING -d mdexIPEndgerät9 -j DNAT --to-destination LANIP9 iptables -t nat -A PREROUTING -d mdexIPEndgerät10 -j DNAT --to-destination LANIP10 iptables -t nat -A PREROUTING -d mdexIPEndgerät11 -j DNAT --to-destination LANIP11 iptables -t nat -A PREROUTING -d mdexIPEndgerät12 -j DNAT --to-destination LANIP12 iptables -t nat -A PREROUTING -d mdexIPEndgerät13 -j DNAT --to-destination LANIP13 iptables -t nat -I POSTROUTING -s LANRouterIP -o tun0 -j SNAT --to-source mdexRouterLANIP iptables -t nat -I POSTROUTING -s LANIP1 -o tun0 -j SNAT --to-source mdexIPEndgerät1 iptables -t nat -I POSTROUTING -s LANIP2 -o tun0 -j SNAT --to-source mdexIPEndgerät2 iptables -t nat -I POSTROUTING -s LANIP3 -o tun0 -j SNAT --to-source mdexIPEndgerät3 iptables -t nat -I POSTROUTING -s LANIP4 -o tun0 -j SNAT --to-source mdexIPEndgerät4 iptables -t nat -I POSTROUTING -s LANIP5 -o tun0 -j SNAT --to-source mdexIPEndgerät5 iptables -t nat -I POSTROUTING -s LANIP6 -o tun0 -j SNAT --to-source mdexIPEndgerät6 iptables -t nat -I POSTROUTING -s LANIP7 -o tun0 -j SNAT --to-source mdexIPEndgerät7 iptables -t nat -I POSTROUTING -s LANIP8 -o tun0 -j SNAT --to-source mdexIPEndgerät8 iptables -t nat -I POSTROUTING -s LANIP9 -o tun0 -j SNAT --to-source mdexIPEndgerät9 iptables -t nat -I POSTROUTING -s LANIP10 -o tun0 -j SNAT --to-source mdexIPEndgerät10 iptables -t nat -I POSTROUTING -s LANIP11 -o tun0 -j SNAT --to-source mdexIPEndgerät11 iptables -t nat -I POSTROUTING -s LANIP12 -o tun0 -j SNAT --to-source mdexIPEndgerät12 iptables -t nat -I POSTROUTING -s LANIP13 -o tun0 -j SNAT --to-source mdexIPEndgerät13
#!/bin/bash iptables -t nat -A PREROUTING -d 10.0.0.1 -j DNAT --to-destination 192.168.0.1 iptables -t nat -A PREROUTING -d 10.0.0.2 -j DNAT --to-destination 192.168.0.10 iptables -t nat -A PREROUTING -d 10.0.0.3 -j DNAT --to-destination 192.168.0.11 iptables -t nat -I POSTROUTING -s 192.168.0.1 -o tun0 -j SNAT --to-source 10.0.0.1 iptables -t nat -I POSTROUTING -s 192.168.0.10 -o tun0 -j SNAT --to-source 10.0.0.2 iptables -t nat -I POSTROUTING -s 192.168.0.11 -o tun0 -j SNAT --to-source 10.0.0.3
#!/bin/bash iptables -t nat -A PREROUTING -d mdex IP-Adresse -j DNAT --to-destination LAN IP-Adresse iptables -t nat -I POSTROUTING -s LAN IP-Adresse -o tun0 -j SNAT --to-source mdex IP-Adresse
Alternativ dazu kann der integrierte DHCP-Server des mdex Routers den angeschlossenen Endgeräten die gewünschten LAN IP-Adressen automatisch zuweisen. Die zu vergebenen IP-Adressen des integrierten DHCP-Servers können Sie den jeweiligen Endgeräten anhand der MAC-Adressen fest zuordnen. Diese Einstellungen nehmen Sie unter Network
LAN in den Konfigurationseinstellen beim DHCP Server vor. Eine Beschreibung dazu finden Sie in der jeweiligen Einrichtungsanleitung des Routers:
Einrichtungsanleitung MX510 im Kapitel 6.4 DHCP-Server einrichten
Einrichtungsanleitung MX530/MX880 im Kapitel 3.8 DHCP-Server
Einrichtungsanleitung MX560 im Kapitel 3.8 DHCP-Server
#!/bin/bash iptables -t nat -A PREROUTING -d mdexRouterLANIP -j DNAT --to-destination LANRouterIP iptables -t nat -A PREROUTING -d mdexIPEndgerät1 -j DNAT --to-destination LANIP1 iptables -t nat -A PREROUTING -d mdexIPEndgerät2 -j DNAT --to-destination LANIP2 iptables -t nat -A PREROUTING -d mdexIPEndgerät3 -j DNAT --to-destination LANIP3 iptables -t nat -A PREROUTING -d mdexIPEndgerät4 -j DNAT --to-destination LANIP4 iptables -t nat -A PREROUTING -d mdexIPEndgerät5 -j DNAT --to-destination LANIP5 iptables -t nat -A PREROUTING -d mdexIPEndgerät6 -j DNAT --to-destination LANIP6 iptables -t nat -A PREROUTING -d mdexIPEndgerät7 -j DNAT --to-destination LANIP7 iptables -t nat -A PREROUTING -d mdexIPEndgerät8 -j DNAT --to-destination LANIP8 iptables -t nat -A PREROUTING -d mdexIPEndgerät9 -j DNAT --to-destination LANIP9 iptables -t nat -A PREROUTING -d mdexIPEndgerät10 -j DNAT --to-destination LANIP10 iptables -t nat -A PREROUTING -d mdexIPEndgerät11 -j DNAT --to-destination LANIP11 iptables -t nat -A PREROUTING -d mdexIPEndgerät12 -j DNAT --to-destination LANIP12 iptables -t nat -A PREROUTING -d mdexIPEndgerät13 -j DNAT --to-destination LANIP13 iptables -t nat -I POSTROUTING -s LANRouterIP -o tun0 -j SNAT --to-source mdexRouterLANIP iptables -t nat -I POSTROUTING -s LANIP1 -o tun0 -j SNAT --to-source mdexIPEndgerät1 iptables -t nat -I POSTROUTING -s LANIP2 -o tun0 -j SNAT --to-source mdexIPEndgerät2 iptables -t nat -I POSTROUTING -s LANIP3 -o tun0 -j SNAT --to-source mdexIPEndgerät3 iptables -t nat -I POSTROUTING -s LANIP4 -o tun0 -j SNAT --to-source mdexIPEndgerät4 iptables -t nat -I POSTROUTING -s LANIP5 -o tun0 -j SNAT --to-source mdexIPEndgerät5 iptables -t nat -I POSTROUTING -s LANIP6 -o tun0 -j SNAT --to-source mdexIPEndgerät6 iptables -t nat -I POSTROUTING -s LANIP7 -o tun0 -j SNAT --to-source mdexIPEndgerät7 iptables -t nat -I POSTROUTING -s LANIP8 -o tun0 -j SNAT --to-source mdexIPEndgerät8 iptables -t nat -I POSTROUTING -s LANIP9 -o tun0 -j SNAT --to-source mdexIPEndgerät9 iptables -t nat -I POSTROUTING -s LANIP10 -o tun0 -j SNAT --to-source mdexIPEndgerät10 iptables -t nat -I POSTROUTING -s LANIP11 -o tun0 -j SNAT --to-source mdexIPEndgerät11 iptables -t nat -I POSTROUTING -s LANIP12 -o tun0 -j SNAT --to-source mdexIPEndgerät12 iptables -t nat -I POSTROUTING -s LANIP13 -o tun0 -j SNAT --to-source mdexIPEndgerät13
#!/bin/bash iptables -t nat -A PREROUTING -d 10.0.0.1 -j DNAT --to-destination 192.168.0.1 iptables -t nat -A PREROUTING -d 10.0.0.2 -j DNAT --to-destination 192.168.0.10 iptables -t nat -A PREROUTING -d 10.0.0.3 -j DNAT --to-destination 192.168.0.11 iptables -t nat -I POSTROUTING -s 192.168.0.1 -o tun0 -j SNAT --to-source 10.0.0.1 iptables -t nat -I POSTROUTING -s 192.168.0.10 -o tun0 -j SNAT --to-source 10.0.0.2 iptables -t nat -I POSTROUTING -s 192.168.0.11 -o tun0 -j SNAT --to-source 10.0.0.3
#!/bin/bash iptables -t nat -A PREROUTING -d 10.32.105.1 -j DNAT --to-destination 192.168.10.1 iptables -t nat -A PREROUTING -d 10.32.105.2 -j DNAT --to-destination 192.168.10.2 iptables -t nat -A PREROUTING -d 10.32.105.3 -j DNAT --to-destination 192.168.10.3 iptables -t nat -A PREROUTING -d 10.32.105.4 -j DNAT --to-destination 192.168.10.4 iptables -t nat -A PREROUTING -d 10.32.105.5 -j DNAT --to-destination 192.168.10.5 iptables -t nat -A PREROUTING -d 10.32.105.6 -j DNAT --to-destination 192.168.10.6 iptables -t nat -A PREROUTING -d 10.32.105.7 -j DNAT --to-destination 192.168.10.7 iptables -t nat -A PREROUTING -d 10.32.105.8 -j DNAT --to-destination 192.168.10.8 iptables -t nat -A PREROUTING -d 10.32.105.9 -j DNAT --to-destination 192.168.10.9 iptables -t nat -A PREROUTING -d 10.32.105.10 -j DNAT --to-destination 192.168.10.10 iptables -t nat -A PREROUTING -d 10.32.105.11 -j DNAT --to-destination 192.168.10.11 iptables -t nat -A PREROUTING -d 10.32.105.12 -j DNAT --to-destination 192.168.10.12 iptables -t nat -A PREROUTING -d 10.32.105.13 -j DNAT --to-destination 192.168.10.13 iptables -t nat -A PREROUTING -d 10.32.105.14 -j DNAT --to-destination 192.168.10.14 iptables -t nat -I POSTROUTING -s 192.168.10.1 -o tun0 -j SNAT --to-source 10.32.105.1 iptables -t nat -I POSTROUTING -s 192.168.10.2 -o tun0 -j SNAT --to-source 10.32.105.2 iptables -t nat -I POSTROUTING -s 192.168.10.3 -o tun0 -j SNAT --to-source 10.32.105.3 iptables -t nat -I POSTROUTING -s 192.168.10.4 -o tun0 -j SNAT --to-source 10.32.105.4 iptables -t nat -I POSTROUTING -s 192.168.10.5 -o tun0 -j SNAT --to-source 10.32.105.5 iptables -t nat -I POSTROUTING -s 192.168.10.6 -o tun0 -j SNAT --to-source 10.32.105.6 iptables -t nat -I POSTROUTING -s 192.168.10.7 -o tun0 -j SNAT --to-source 10.32.105.7 iptables -t nat -I POSTROUTING -s 192.168.10.8 -o tun0 -j SNAT --to-source 10.32.105.8 iptables -t nat -I POSTROUTING -s 192.168.10.9 -o tun0 -j SNAT --to-source 10.32.105.9 iptables -t nat -I POSTROUTING -s 192.168.10.10 -o tun0 -j SNAT --to-source 10.32.105.10 iptables -t nat -I POSTROUTING -s 192.168.10.11 -o tun0 -j SNAT --to-source 10.32.105.11 iptables -t nat -I POSTROUTING -s 192.168.10.12 -o tun0 -j SNAT --to-source 10.32.105.12 iptables -t nat -I POSTROUTING -s 192.168.10.13 -o tun0 -j SNAT --to-source 10.32.105.13 iptables -t nat -I POSTROUTING -s 192.168.10.14 -o tun0 -j SNAT --to-source 10.32.105.14
Admin -> Maintenance -> Reboot