Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Mar 2011 12:34:07 +0200
From:      Kaya Saman <kayasaman@gmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Setting up a a route in FreeBSD with NAT issues
Message-ID:  <AANLkTimRCEexx5RBJ207JkkOQhGfMH7UcnGq6cs0DcMi@mail.gmail.com>
In-Reply-To: <AANLkTikFs0J_d9_BDYoXecb9JmcxX2e5PkBcuua1fNVq@mail.gmail.com>
References:  <AANLkTikFs0J_d9_BDYoXecb9JmcxX2e5PkBcuua1fNVq@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ok I've managed to make some headway however it still isn't working
properly:


/etc/ipnat.rules


#map em1 10.100.100.0/26 -> 0.0.0.0/32 portmap tcp/udp 10000:65000
map em1 10.100.100.0/26 -> 0.0.0.0/32
map em1 10.100.100.0/26 -> 0.0.0.0/32 auto


I then added this addition to the end of the

/etc/rc.conf file:


static_routes="em0 em1"
route_em1="-net 10.100.100.0/26 172.16.0.0/20"
route_em0="-net 172.16.0.0 0.0.0.0/0"


when I run traceroute on my host now I can see it going through the system
however I'm still not sure it's being NAT'd or routed??

ROUTER# ipnat -l
List of active MAP/Redirect filters:
map em1 10.100.100.0/26 -> 0.0.0.0/32

List of active sessions:
MAP 10.100.100.1    53    <- -> 10.100.100.1    53    [10.100.100.2 32772]



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimRCEexx5RBJ207JkkOQhGfMH7UcnGq6cs0DcMi>