Re: Changing the desitnation (DNAT) locally

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Al Sparks wrote:

So, is what I'm doing doable? If so, how do I do it?
=== Al


First of all, you don't need to add a route to do it.
Second the normal loopback address is 127.0.0.1, so you need to add another loopback interface address of 127.0.0.5 if you expect to accept a packet re-addressed by DNAT to 127.0.0.5.


If those are corrected then what you need to change the destination address of a packet generated locally is something like this in /etc/sysconfig/iptables:
*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]


-A OUTPUT -d 192.168.100.99/32 -j DNAT --to-destination 127.0.0.5

COMMIT

--
-----------------------------------------------------------
  "Spend less!  Do more!  Go Open Source..." -- Dirigo.net
  Chris Johnson, RHCE #807000448202021





[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux