Saturday, August 26, 2017

connect udp tunnel to linux host

1- install ubridge
$ git clone https://github.com/GNS3/ubridge.git
$ cd ubridge
$ make
$ sudo make install


2- virtualbox udp tunnel interface configure as below

Device -- > network --> Adaptor number -->
- attached to :generic driver
- Name :UDPtunnel
- Generic properties:
dest=localhost
dport=10005
sport=10001



3- start ubridge in supervision mode
$ ubridge -H 2222

- create bridge and add ports to the bridge
$ telnet localhost 2222
bridge create br0
bridge add_nio_tap br0 tap0
bridge add_nio_udp br0 10005 127.0.0.1 10001

bridge start br0


now, tap0 will be appear in network interface list and it is paired with virtualbox udp tunnel interface

to show the bridge
bridge show br0
101 bridge 'br0' is running
101 Source NIO: tap1
101 Destination NIO: 30000:127.0.0.1:30001


***********
we can also start with configuration file, so no need to do with cli, below is the example of the ubridge.ini file

    ; bridge Ethernet interface eth0 with an UDP tunnel
    [bridge0]
    source_ethernet = eth0
    destination_udp = 10000:127.0.0.1:10001 ; syntax is local_port:remote_host:remote_port

    ; bridge TAP interface tap0 with an UDP tunnel
    ; and capture packets to /tmp/bridge1.pcap
    [bridge1]
    source_tap = tap0
    destination_udp = 11000:127.0.0.1:11001
    pcap_file = /tmp/bridge1.pcap
    pcap_protocol = EN10MB ; PCAP data link type, default is EN10MB

    ; it is even possible to bridge two UDP tunnels and capture!
    [bridge2]
    source_udp = 40000:127.0.0.1:40001
    destination_udp = 50000:127.0.0.1:50001
    pcap_file = /tmp/bridge2.pcap

    ; or to bridge 2 interfaces
    [bridge3]
    source_tap = tap0
    destination_ethernet = vmnet2

9 comments:

  1. Its not at all an easy task to connect udp tunnel to linux host,but with your proper guidance thabfully I have been able to do so.

    ReplyDelete
  2. This particular post is really very interesting. It has a really great peace of Data,
    I enjoyed very well with this particular blog it has very useful information
    I like to much the style of this Article
    thats really nice and informative article.Thank You.

    hey,look, i found something very interesting article

    about garden tools and tips,
    best gas grill under 200
    best gas grill under 500
    best lawn edger
    best chaninsaw under 200
    best inflatable water slides
    Deepest inflatable pool

    ReplyDelete
  3. Are you looking for guest posting/blogging sites? then click :
    seo submit a guest post

    ReplyDelete
  4. Thansk a lot for posting this interesting article

    games for kids online

    ReplyDelete