Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Jun 1999 17:54:16 -0700 (PDT)
From:      Jonathan Hanna <pangolin@home.com>
To:        freebsd-net@freebsd.org
Subject:   natd, libalias, and PKT_ALIAS_REVERSE
Message-ID:  <19990618005416.RUKU6363.mail.rdc1.bc.home.com@cr1003333-a.crdva1.bc.wave.home.com>

next in thread | raw e-mail | index | archive | help

I tried natd -reverse and got a core dump due to infinite recursion.

alias.c in libalias has this rather amusing code:

int 
PacketAliasIn(char *ptr, int maxpacketsize)
{   
    struct in_addr alias_addr;
    struct ip *pip;
    int iresult;
    
    if (packetAliasMode & PKT_ALIAS_REVERSE) 
        return PacketAliasOut(ptr, maxpacketsize);
...

int 
PacketAliasOut(char *ptr,           /* valid IP packet */
               int  maxpacketsize   /* How much the packet data may grow
                                       (FTP and IRC inline changes) */
              )
{   
    int iresult;
    struct in_addr addr_save;
    struct ip *pip;
    
    if (packetAliasMode & PKT_ALIAS_REVERSE)
        return PacketAliasIn(ptr, maxpacketsize);
...

I noticed also that PKT_ALIAS_REVERSE is not documented int libalias.3. 


What I actually want do to is redirect connections from my internal network
to a certain external host to an ssh port (on 127.0.0.1). What's a good way
of doing this?

This is on reasonably up to date current and 3.2 stable.

Jonathan Hanna <pangolin@home.com>



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990618005416.RUKU6363.mail.rdc1.bc.home.com>