This is a discussion on Routing external address to loopback within the Linux Networking forums, part of the Linux Forums category; Hello, I am having a slight problem with a service that needs to reserve IP addresses the host doesn't ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
I am having a slight problem with a service that needs to reserve IP addresses the host doesn't have at the time the service starts (It is supposed to operate in backup mode). I've been trying to actually use loopback addresses for the service and then route the external address to the loopback address, but this doesn't seem to work properly. #!/bin/bash iptables -t nat -A POSTROUTING --source 127.0.1.3 \ -j SNAT --to-source 10.120.1.3 iptables -t nat -A PREROUTING --destination 10.120.1.3 \ -j DNAT --to-destination 127.0.1.3 echo 1 > /proc/sys/net/ipv4/ip_forward #End sample If I do that I cannot even ping the external address (10.123.1.3) from any other host; only from the host in quiestion itsself. The FORWARD chain of the filter table is empty with an ACCEPT policy. Did I forget something? Or is it generally impossible to route something to loopback? Thanks for help, Björn |
![]() |
| Thread Tools | |
| Display Modes | |
|
|