Can I use netgraph to change packets source address?

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Sat Aug 21 13:12:46 PDT 2004


stan <stanb at panix.com> writes:

> I'm trying to build a "vpn" from my home network to my work network.
> 
> So far I've managed to ge the ppp link (tuneled over ssh through socks)
> between a mchine at work, and a machine at home. I've added routes to the
> work network on the mahcine at home, and added routes back to the ppp
> machine at home from my default router machien for bothe the work network
> numbers, and the (192.168.x.x) addresses of bpth ends of the ppp link. So,
> I can access any machien at home from the machine at work that originates
> the ppp link, and I can access that amchien from any machine on my network
> at home.
> 
> So far so good, however the remaining stumbling block is getting beyond
> thta machine at work. The packets it puts on the woek network still have a
> source address of 192.168.x.x. And of course amchiens at work don't have
> nay idea how to get packets back to that network.
> 
> I need the machine at work to do something like "reverse NAT", thta is I
> need for all the packets that it puts on the work network to have a src
> address of thta machine, and I need it to be able to translate the reply
> packets back to 192,168.x.x.
> 
> Can I do this with netgraph or soemthing?

Isn't this exactly what the -nat option of ppp(8) is for?


More information about the freebsd-questions mailing list