• Welcome to Hurricane Electric's IPv6 Tunnel Broker Forums.

Automatic Setup and configuration of IPv6 Tunnel on OSX

Started by Affix, December 14, 2013, 04:42:39 PM

Previous topic - Next topic

Affix

Hey Guys,

A little Script and launchd tool to automatically setup and configure your tunnel on HE.NET

v6.sh

curl "https://<user>:<pass>@www.tunnelbroker.net/ipv4_end.php?tid=153425"
sudo ifconfig gif0 create
sudo ifconfig gif0 tunnel <v4 Address> 216.66.84.42
sudo ifconfig gif0 inet6 <v6 Address> 2001:470:1f12:df8::1 prefixlen 128
sudo route -n add -inet6 default <V6 Route>



~/Library/LaunchAgents/com.affix.v6.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>Label</key>
   <string>com.affix.v6</string>
   <key>Program</key>
   <string>/Path/To/v6.sh</string>
   <key>RunAtLoad</key>
   <true/>
</dict>
</plist>


Once you have the 2 files configured run the following as root.


launchctl load /Users/<user>/Library/LaunchAgents/com.affix.v6.plist
launchctl start com.affix.v6



Basic I know but meh might help someone

nilbus