Routing external address to loopback

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 ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 4 Days Ago
Björn Keil
 
Posts: n/a
Default Routing external address to loopback

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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:45 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0