NetBSD-Users archive

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

Re: ipnat on same interface?

If the connections are TCP only, you should check out rinetd in pkgsrc.
It's lightweight and can essentially redirect traffic from one IP to
another by accepting a connection on one IP, creating a second connection
to an external IP and passing traffic between them. It's not technically
NAT or port forwarding, but it would do what you're asking.

> Hi!
> Has anyone succeeded in configuring ipnat to do NAT/port forwarding
> to/from the same network interface? I have a service where I want to
> have a single frontend machine with a public IP address, and I want to
> avoid disclosing the public IP addressses of the actual (say three)
> machines that actually perform the service. I want to distinguish the
> actual machines by selecting ports on the frontend machine. The frontend
> machine only has one interface, so the packets need to go in and out
> through the same interface.
> call @frontend:1001  --> NAT -->  reach @actual1:99
> call @frontend:1002  --> NAT -->  reach @actual2:99
> call @frontend:1003  --> NAT -->  reach @actual3:99
> Any hints?
> ... or, is this simply not possible, due to the physics of ipf/ipnat?
> (I just blew my remote test box off the water, so "that was obviously
> not the right way to do it" ... ;-) ;-) I'll be more careful next time,
> I promise ... ;-)
>                               Cheers,
>                                 /Lars-Johan Liman
> #----------------------------------------------------------------------
> # Lars-Johan Liman, M.Sc.   ! E-mail/SIP/Jabber:
> # Senior Systems Specialist ! Tel: +46 8 - 562 860 12
> # Autonomica AB, Stockholm  !
> #----------------------------------------------------------------------

Home | Main Index | Thread Index | Old Index