How do I set the source address on a multi-homed host?

Emanuel Strobl emanuel.strobl at gmx.net
Tue Feb 15 13:27:33 GMT 2005


Am Samstag, 12. Februar 2005 16:05 schrieb Daniela:
> On Friday 11 February 2005 21:27, Alin-Adrian Anton wrote:
> > Daniela wrote:
> > > I have two NICs (one inside and one outside interface) with NAT
> > > activated. The problem is that every time I establish a connection with
> > > a machine on my LAN, it uses the address of the outside interface as
> > > the source of the packets, which creates problems with my firewall. How
> > > do I tell my machine to use the other address whenever I connect to a
> > > local machine?
> > >
> > > Daniela
> >
> > Hi Daniela,
> >
> > Can you please be more specific? You mean this happens when you are
> > connecting from inside intranet to some other point inside intranet?
>
> Yes, this happens when I connect from my machine (which functions as a
> router with NAT to allow the other LAN machines connect to the internet) to
> another LAN machine. When the router establishes a connection to another
> point in the intranet, the source address used is my official IP, and not
> 10.0.0.1, which is the intranet IP of the router.
> In other words, I want the source address to be 10.0.0.1 on every outgoing
> connection where the destination is inside my intranet.

It's easy if your doing NAT with PF or IPF, something like:
nat pass on $o_if from $localnet to !$otherlocal_net -> $oif_addr
is what you want.

-Harry
>
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to
> "freebsd-questions-unsubscribe at freebsd.org"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20050215/10b1a25c/attachment-0001.bin


More information about the freebsd-questions mailing list