commit | 3d8d5f3ba24653e02ca82b07717174df3e0c5ca9 | [log] [tgz] |
---|---|---|
author | Toshi Kikuchi <toshik@google.com> | Wed Jun 06 16:23:17 2018 -0700 |
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | Fri Jun 15 16:19:04 2018 +0000 |
tree | e3d947a55b276a773211b1b6d66919baad20f62b | |
parent | 85be231d587d75e78f091887b5c76a712a3b1340 [diff] |
Packet forwarding to enable NAT This change forwards a packet from one NIC to another NIC if Forwarding is enabled on the stack. Change-Id: I845c7bad9d1cff5e99e9b812d00d1b4b7e8f2038
Netstack is a network stack written in Go.
Try it out on Linux by installing the tun_tcp_echo demo:
go install github.com/google/netstack/tcpip/sample/tun_tcp_echo
Create a TUN device with:
[sudo] ip tuntap add user <username> mode tun <device-name> [sudo] ip link set <device-name> up [sudo] ip addr add <ipv4-address>/<mask-length> dev <device-name>
Then run with:
tun_tcp_echo <device-name> <ipv4-address> <port>
We would love to accept contributions, but we have not yet worked out how to handle them. Please contact us before sending any pull requests.
Whatever we do decide on will require signing the Google Contributor License. Please see CONTRIBUTING.md for more details.
This is not an official Google product (experimental or otherwise), it is just code that happens to be owned by Google.