Servus,
alles was mit eth0 zu tun hat funktioniert einwandfrei. Nun möchte ich allen eingehenden Traffic für die IP 152.53.175.70 auf eth0:0 umleiten. Kann mir jemand sagen was ich falsch mache? Danke
alles was mit eth0 zu tun hat funktioniert einwandfrei. Nun möchte ich allen eingehenden Traffic für die IP 152.53.175.70 auf eth0:0 umleiten. Kann mir jemand sagen was ich falsch mache? Danke
Code:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 152.55.89.136/22
gateway 152.55.89.1
# zusätzliche IP
post-up ip addr add 152.53.175.70/32 dev eth0 label eth0:0
pre-down ip addr del 152.53.175.70/32 dev eth0
auto vmbr0
iface vmbr0 inet static
address 10.10.10.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o eth0 -j MASQUERADE
post-up iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 10.10.10.100:80
post-down iptables -t nat -D PREROUTING -i eth0 -p tcp --dport 80 -j DNAT --to-destination 10.10.10.100:80
post-up iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j DNAT --to-destination 10.10.10.100:443
post-down iptables -t nat -D PREROUTING -i eth0 -p tcp --dport 443 -j DNAT --to-destination 10.10.10.100:443
post-up iptables -A FORWARD -p tcp -d 10.10.10.100 --dport 80 -j ACCEPT
post-down iptables -D FORWARD -p tcp -d 10.10.10.100 --dport 80 -j ACCEPT
post-up iptables -A FORWARD -p tcp -d 10.10.10.100 --dport 443 -j ACCEPT
post-down iptables -D FORWARD -p tcp -d 10.10.10.100 --dport 443 -j ACCEPT
post-up iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1
# zusätzliche IP alles auf 10.10.10.110 umleiten
iptables -t nat -A PREROUTING -d 152.53.175.70 -j DNAT --to-destination 10.10.10.110
iptables -t nat -A POSTROUTING -d 10.10.10.110 -j MASQUERADE