{ radak.org }         just another (tech) blog

20Apr/109

Multicast over SSH tunnel with TAP bridge

If you found this post you know what you want, so I won't describe it from the begining!

My network plan was:

Multicast over SSH tunnel with TAP bridge

On linux server:
1. add 'PermitTunnel yes' to /etc/ssh/sshd_config and restart sshd
2. create tap device for user
tunctl -u your_username -t tap0
3. bring up tap0 interface with no IP
ifconfig tap0 0.0.0.0 up
4. bring up eth1 interface with no IP
ifconfig eth1 0.0.0.0 up
3. create bridge interface
brctl addbr br0
4. turn off spanning-tree on bridge interface
brctl stp br0 off
5. add eth1 and tap0 to bridge
brctl addif br0 eth1
brctl addif br0 tap0

6. bring up br0 with IP 10.0.0.1/24 (you will access this IP from client via tunnel)
ifconfig br0 10.0.0.1/24 up
7. add multicast network to bridge interface (my multicast address range begin from 233.1.1.1)
route add -net 233.1.1.0/24 dev br0

On Mac OS X client:
1. install Tunnelblick or tuntap to load tun/tap driver for OSX
2. run ssh with tunnel mode (-o Tunnel=ethernet -> use tap instead of tun; -w 0:0 -> local_tap_dev:remote_tap_dev)
sudo ssh -o Tunnel=ethernet -w 0:0 your_username@linux_server_hostname
3. add ip for tap0 device
sudo ifconfig tap0 10.0.0.2/24 up
5. add multicast network to tunnel interface (on linux you should use: route add -net 233.1.1.0/24 dev tap0)
sudo route add -net 233.1.1.0/24 -interface tap0
4. check connection
ping 10.0.0.1
6. run VLC and enjoy streams :)

Comments (9) Trackbacks (0)
  1. great post as usual!

  2. Great information! I’ve been looking for something like this for a while now. Thanks!

  3. Wow this is a great resource.. I’m enjoying it.. good article

  4. This is such a great resource that you are providing and you give it away for free. I enjoy seeing websites that understand the value of providing a prime resource for free. I truly loved reading your post. Thanks!

  5. Valuable info. Lucky me I found your site by accident, I bookmarked it.

  6. I want to quote your post in my blog. It can?
    And you et an account on Twitter?

  7. I would like to exchange links with your site http://www.radak.org
    Is this possible?

  8. Well I found this on Digg, and I like it so I dugg it!


Leave a comment


No trackbacks yet.