Tunneling ipv6 di FreeBSD 4.7 STABLE

Mungkin teknologi ini sudah lama kita kenal, mudah2an pengalaman yang saya  curahkan di tulisan ini bermanfaat bagi pembaca yang budiman. Pe...

Mungkin teknologi ini sudah lama kita kenal, mudah2an pengalaman yang saya  curahkan di tulisan ini bermanfaat bagi pembaca yang budiman.
Persiapan
Pastikan anda telah mempunyai koneksi dengan ip static versi 4 (ipv4), atau ip address yang selama ini anda pake. setelah itu anda perlu register ke IPng atau yang menyediakan space IPv6 gratis, rata-rata mereka menyediakan space /64 dan /48, disini saya akan menjelaskan sebatas setup tunneling IPv6 di FreeBSD saja. untuk konsep basic IPv6 silahkan anda baca ke site2 yang terkait termasuk RFC yang menjelaskan hal ini.
1. Silahkan anda register ke site2 tunnelbroker, cukup pilih salah satu saja:
  • http://www.freenet6.net/
  • http://tunnelbroker.net/
Untuk http://www.freenet6.net/ telah tersedia di /usr/ports/net/freenet6 dan silahkan anda download clientnya dan register di sitenya. freenet6 ini sangat bermanfaat untuk koneksi dialup, sedangkan http://tunnelbroker.net/ bersifat statis (registry ip) di site bersangkutan. setelah itu anda akan mendapatkan space address IPv6nya. dan rata2 anda diminta untuk memasukan IPv4 address anda sbg tunnelingnya, setelah itu anda akan mendapatkan IPv4 remote (uplink), IPv6 client, IPv6 remote (server).
2. Compile kernel mesin router anda supaya support IPv6.
$ cat /usr/src/sys/i386/conf/NAMA_KERNEL_ANDA

options INET6 #IPv6 communications protocols
pseudo-device gif #IPv6 and IPv4 tunneling
pseudo-device faith 1 #IPv6-to-IPv4 relaying (translation)
pseudo-device bpf #Berkeley packet filter

options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=100

options IPV6FIREWALL
options IPV6FIREWALL_VERBOSE
options IPV6FIREWALL_VERBOSE_LIMIT=100

options IPFW2 #Optional jika anda pake IPFW2
options IPFIREWALL_FORWARD

options IPDIVERT
options IPFILTER
options IPFILTER_LOG
options IPFILTER_DEFAULT_BLOCK
3. Jika anda mempunyai 2 interface di mesin anda misalnya menggunakan wireless sebagai koneksi ke ISP anda, ada baiknya anda gunakan internal interface alias link yang ke local network saja. misalnya di mesin saya mengunakan wi0 untuk link ke ISP dan xl0 untuk link ke local network, nah sebelom itu kita wajib setting untuk interface tunnelingnya yaitu gif.
$ ifconfig gif0 create
$ ifconfig gif0 tunnel IPv4_LOCAL_CLIENT IPv4_REMOTE_TUNNEL
$ ifconfig gif0 inet6 IPv6_LOCAL_CLIENT IPv6_LOCAL_REMOTE_TUNNEL prefixlen 128
$ route -n add -inet6 default IPv6_LOCAL_REMOTE_TUNNEL
$ ifconfig gif0 up
Step diatas dilakukan secara manual, jika anda pake tunnelbroker freenet6 tentunya tinggal anda jalankan daemonya dan sebelomnya tentunya anda setting dahulu /usr/local/etc/tspc.conf, misalnya saya cantumkan yang saya:
$ cat /usr/local/etc/tspc.conf
host_type=router
prefixlen=48
if_prefix=xl0
tsp_version=1.0.1
tsp_dir=/usr/local
auth_method=any
client_v4=ISI_IP_IPv4_INTERFACE_LOCAL
userid=xxx
passwd=xxx
template=freebsd44
server=tsps1.freenet6.net
retry_delay=0
if_tunnel=gif0
Data2 diatas tentunya didapat pas anda registri ke http://www.freenet6.net/,Jika anda menggunakan http://tunnelbroker.net/ anda mengisi/update via web (tidak meninstall aplikasi client di mesin anda). Kalo anda pake freenet6 tentunya tinggal jalankan daemon tspc.
$ /usr/local/bin/tspc -v -f /usr/local/etc/tspc.conf
atau
$ /usr/local/etc/rc.d/freenet.sh start
Pastikan anda check dengan menggunakan command ifconfig -a.
$ ifconfig -a
xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 202.143.103.229 netmask 0xfffffff0 broadcast 202.143.103.239
inet6 fe80::260:97ff:fedc:f02e%xl0 prefixlen 64 scopeid 0x1
inet 202.143.103.225 netmask 0xffffffff broadcast 202.143.103.225
inet6 2001:470:1f00:947::9 prefixlen 64
inet6 2001:470:1f00:947::5 prefixlen 64
ether 00:60:97:dc:f0:2e
media: Ethernet autoselect (10baseT/UTP)
status: active

lp0: flags=8810<POINTOPOINT,SIMPLEX,MULTICAST> mtu 1500
faith0: flags=8002<BROADCAST,MULTICAST> mtu 1500
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x4
inet 127.0.0.1 netmask 0xff000000

gif0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
tunnel inet 202.143.103.229 --> 64.71.128.82
inet6 fe80::260:97ff:fedc:f02e%gif0 prefixlen 64 scopeid 0x6
inet6 2001:470:1f00:ffff::69f --> 2001:470:1f00:ffff::69e prefixlen 128
4. Kita setup beberapa firewall diantaranya ``ipfw'' dan ``ipf'', untuk ini kita musti extra hati2 karena masalah yg selama ini dihadapi justru karena firewall.
$ grep ipv6 /etc/ipf.rules
pass out quick on ${interface} proto ipv6 from any to any keep state
pass in quick on ${interface} proto ipv6 from any to any keep state
Untuk ${interface} anda ganti dengan interface eksternal dan internal misalnya ed0, wi0, xl0 dsb. ini dilakukan agar anda bisa konek via IPv4 ke tunnelbroke (uplink anda) karena musti kita ingat bahwa proses ini adalah melakukan interaksi dengan IPv6 melalui IPv4 tentunya di firewall IPv4 musti kita "allow" untuk protocol IPv6 juga.
$ more /etc/rc.firewall
${ip_tunnel}="ISI_IPv4_REMOTE"
${fwcmd} add 100 allow ip from any to ${ip_tunnel}
${fwcmd} add 101 allow ip from ${ip_tunnel} to any
Untuk IPv4 remote tentunya musti anda "allow" dari router anda. pastikan untuk urusan IPv4 ke/dari remote uplink anda nggak ke block dari mesin anda baik ip, proto ipv6 (ipfilter).
$ cat /etc/ipf6.rules
pass in quick on lo0 all
pass out quick on lo0 all
pass in quick on wi0 all
pass in quick on xl0 all
pass in quick on gif0 all
pass out quick on wi0 all
pass out quick on xl0 all
pass out quick on gif0 all
Untuk gampangnya silahkan anda "allow" dulu dari setiap interface yang terpasang dimesin anda. setelah itu setelah anda membagi bagi IPv6 anda untuk network anda baru anda spesifikasikan per-IP untuk route ke mesin.
$ cat /etc/rc.firewall6
${fw6cmd} add 100 pass all from :: to ff02::/16
${fw6cmd} add 101 pass all from fe80::/10 to fe80::/10
${fw6cmd} add 102 pass all from fe80::/10 to ff02::/16
${fw6cmd} add 103 pass all from ::1/128 to any
${fw6cmd} add 104 pass all from any to ::1/128
${fw6cmd} add 200 pass all from any to any
Untuk rule no 200 tentunya anda cantumkan secara global dulu, setelah itu anda setup untuk block IPv6 anda.
4. Agar permanen ada banyak cara untuk hal ini. coba lakukan via rc.conf.
$ cat /etc/rc.conf
ipv6_enable="YES"
ipv6_defaultrouter="ISI_IPv6_REMOTE_UPLINK_ANDA"
ipv6_gateway_enable="YES"
ipv6_network_interfaces="gif0 xl0"
ipv6_ifconfig_gif0="IPv6_GIF0_DI_MESIN_ANDA IPv6_GIF0_REMOTE_BROKER prefixlen 128" ipv6_ifconfig_xl0="IPv6_INTERFACE_INTERNAL_ANDA prefixlen 64"
gif_interfaces="gif0"
gifconfig_gif0="IPv4_GIF0_DI_MESIN_ANDA IPv4_GIF0_REMOTE_BROKER"
rtadvd_enable="YES"
rtadvd_interfaces="ISI_INTERNAL_INTERFACE"
ipfilter_enable="YES"
ipfilter_rules="/etc/ipf.rules"
ipv6_ipfilter_rules="/etc/ipf6.rules" # rules definition file for ipfilter
ipv6_firewall_enable="YES"
ipv6_firewall_script="/etc/rc.firewall6"
Untuk rtadvd(8) bersifat melakukan broadcase, ke client di bawah netrwork kita. analoginya mirip DHCP.
5. Kita buat konfigurasi untuk rtadvd(8), rtadvd.conf(5), kita letakkan di /etc, gunanya simplenya berfungsi seperti DHCP server, memberikan IPv6 secara random kepada client kita.
$ cat /etc/rtadvd.conf
xl0:\
:addrs#1:\
:addr="ISI_IPv6_ADDRESS_INTERFACE_INTERNAL_ANDA":prefixlen#64:tc=ether:
Untuk interface ganti dengan internal interface mesin anda berikut address IPv6nya.
6. Setup seperlunya dah kita lakukan, sekarang kita coba untuk testing koneksi ke luar/dalam network kita.
$ ping6 IPv6_REMOTE_BROKER_ANDA
$ ping6 www.kame.net
$ traceroute6 IPv6_REMOTE_BROKER_ANDA
$ traceroute6 www.kame.net
Jika anda dapat masalah seperti "no route to host", "permission deny", atau pas ping macet, itu gejala2 keblock di firewall anda baiknya coba trace error satu per satu.
Thank to: aliwardani@yahoo.com in CA.
$Id: ipv6.txt,v 1.7 2005-02-04 21:53:30+07 budsz Exp $

COMMENTS

Name

Application Support,19,database server,1,Desktop/XWindow,1,DNS Server,2,Email Server,3,Firewall,1,FTP Server,2,General,2,IPFilter,1,Kernel,2,Networking,8,Proxy Server,4,Security,6,Tips and Trick,5,Web Server,2,
ltr
item
IndoFreeBSD: Tunneling ipv6 di FreeBSD 4.7 STABLE
Tunneling ipv6 di FreeBSD 4.7 STABLE
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcBlR4U4HmHGmNLZBEiQc5MHn20q3th3weBRwJI8y-fgwLd0ojeaZOX8yziW5J-g54yL19ZPwbANp6EiPX_Y54AXakl7V0bkCp7Jb04OivdKNO4UAgCB-pDEGIGj_3H8QTjn-zs1e8tYup/s1600/ipv6.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcBlR4U4HmHGmNLZBEiQc5MHn20q3th3weBRwJI8y-fgwLd0ojeaZOX8yziW5J-g54yL19ZPwbANp6EiPX_Y54AXakl7V0bkCp7Jb04OivdKNO4UAgCB-pDEGIGj_3H8QTjn-zs1e8tYup/s72-c/ipv6.png
IndoFreeBSD
http://www.indofreebsd.or.id/2015/02/tunneling-ipv6-di-freebsd-47-stable.html
http://www.indofreebsd.or.id/
http://www.indofreebsd.or.id/
http://www.indofreebsd.or.id/2015/02/tunneling-ipv6-di-freebsd-47-stable.html
true
1901051463523757307
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content