Difference between revisions of "Proxy NDP"

From the Linux and Unix Users Group at Virginia Teck Wiki
Jump to: navigation, search
imported>Mjh
(Uniluug migration)
 
 
(8 intermediate revisions by 2 users not shown)
Line 23: Line 23:
 
  ip -6 neigh add proxy $ext_ip dev $int_if
 
  ip -6 neigh add proxy $ext_ip dev $int_if
 
Replace '''$ext_ip''' and '''$int_if''' as needed.
 
Replace '''$ext_ip''' and '''$int_if''' as needed.
 +
 +
[[Category:Needs restoration]]
 +
[[Category:Infrastructure]]

Latest revision as of 19:38, 27 January 2019

  • 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.