Antinat outgoing ip

This post is the first in a series of posts about antinat. The posts will provide solutions for some "problems' with antinat. So here goes the first one ....


Antinat creates outgoing connection from the primary ip defined on the machine where it's running. There's a config option to make antinat listen on a specific ip but no config option to make it use a specific ip for outgoing connections.


The attached patch will make antinat use the same ip that it's listening on for outgoing connections. You specify the listening ip with the "interface" config option and now that ip will also be used for outgoing connections.

[download id="23"]

I assume you already know how to patch ... if not ... just ask in the comments or hire me to patch it for you 🙂

2 thoughts on “Antinat outgoing ip

  1. Doesn’t work:
    /bin/sh ..//libtool –mode=link gcc -o an-tests an-tests.lo -lnsl -L../client -lantinat -lpthread
    gcc -o .libs/an-tests an-tests.o -L/tmp/antinat-0.90/client /tmp/antinat-0.90/client/.libs/ -lnsl -lpthread -Wl,–rpath -Wl,/usr/local/lib
    /tmp/antinat-0.90/client/.libs/ undefined reference to `config_getInterface’
    /tmp/antinat-0.90/client/.libs/ undefined reference to `conf’
    collect2: ld returned 1 exit status
    make[1]: *** [an-tests] Error 1
    make[1]: Leaving directory `/tmp/antinat-0.90/tests’
    make: *** [all-recurse] Error 2

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.