Skip to content

Instantly share code, notes, and snippets.

@BranLiang
Last active January 16, 2023 14:51
Show Gist options
  • Save BranLiang/14536816b073127179c746981c00db27 to your computer and use it in GitHub Desktop.
Save BranLiang/14536816b073127179c746981c00db27 to your computer and use it in GitHub Desktop.
Unix network configuration

A tunnel interface example:

utun10: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1350 inet 10.10.0.6 --> 10.10.0.5 netmask 0xffffffff

The following parameters are specific to IP tunnel interfaces, gif(4):

tunnel src_addr dest_addr Configure the physical source and destination address for IP tunnel interfaces. The arguments src_addr and dest_addr are interpreted as the outer source/destination for the encapsulating IPv4/IPv6 header.

So with the example above, 10.10.0.6 is the src_addr and 10.10.0.5 is the dest_addr.

$ ip route list
0.0.0.0/1 via 10.10.0.5 dev utun10 <-- Half of the network is routed to the vpn dest_addr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment