Programmatically forwarding packets to outgoing interface

Julian Elischer julian at freebsd.org
Mon Sep 23 04:10:14 UTC 2013


On 9/23/13 11:55 AM, Ihsan Junaidi Ibrahim wrote:
> Hi folks,
>
> I'm trying to learn building a VPN-type application on FreeBSD and I'm currently stuck at trying to route packets to outgoing interface.
>
> I've managed to push/pop IP packets in a tun(4) interface but now that I can read the inner packet header, I need to route the payload out of the box. I'm not quite sure which API I need to use to achieve this.
>
> The inner packets can be of either IPv4 or IPv6.
>
> Thanks.
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>
>
you can try use ipfw and its 'fwd' option to reroute packets
not sure if fwd works with ipv6.. I've never tried..


More information about the freebsd-net mailing list