Proxy NDP

From the Linux and Unix Users Group at Virginia Teck Wiki
Revision as of 09:17, 3 January 2018 by imported>Pew
Jump to: navigation, search

TODO: Include reference to where to find this on Network, then delete this page

  • First, set these sysctls:
sysctl -w net.ipv6.conf.$ext_if.forwarding=1
sysctl -w net.ipv6.conf.$int_if.forwarding=1
sysctl -w net.ipv6.conf.$ext_if.proxy_ndp=1
sysctl -w net.ipv6.conf.$int_if.proxy_ndp=1

Make sure to replace $ext_if with your external interface and $int_if with your internal interface.

  • Also, ensure that you are allowing forwarding with ip6tables. You can either set it up for each interface individually, or just allow all packets:
ip6tables -P FORWARD ACCEPT
  • Now, run these on your external interface:
ip link set $ext_if promisc on
ip -6 route add $ext_ip dev $ext_if
ip -6 route add default via $router_ip dev $ext_if metric 512

Replace $ext_ip and $router_ip as necessary.

  • Next, for each machine you want to add behind your router, run these commands:
ip -6 neigh add proxy $machine_ip dev $ext_if
ip -6 route add $machine_ip dev $int_if

Replace $machine_ip with the machine's IPv6 address, and replace $ext_if, and $int_if with the appropriate interfaces as above.

  • Finally, run this to allow hosts behind your router to access your router's external IP:
ip -6 neigh add proxy $ext_ip dev $int_if

Replace $ext_ip and $int_if as needed.