RSS구독하기:SUBSCRIBE TO RSS FEED
즐겨찾기추가:ADD FAVORITE
글쓰기:POST
관리자:ADMINISTRATOR

How to create IP-IP tunnel between FreeBSD and Linux

April 5, 2010
By Adrian
Sometimes, I need to connect remote Unix servers with tunnels to provide some specific services or to get access to some internal networks. I was very surprised, when my friend, young system administrator, asked me about how to bring up IP-IP tunnel between different Unix operating systems (FreeBSD and Linux in his case) and said, that he can’t find information about this configuration. As the result of my discovering, this HOWTO has been created.
Lets see to what we have and what we need to do.
We have 2 servers:
  • Server1:
    • OS: Linux
    • Network Interface: eth0
    • IP: 100.100.100.100
  • Server2:
    • OS: FreeBSD
    • Network Interface: fxp0
    • IP: 200.200.200.200
We need to get IPv4 over IPv4 tunnel with the following parameters between described servers:
  • Server1: 10.0.0.1 / 255.255.255.252
  • Server2: 10.0.0.2 / 255.255.255.252
To setup described configuration on Linux server we need to do following steps:
  • Create ipip tunnel interface:

    # ip tunnel add tun0 mode ipip > remote 200.200.200.200 local 100.100.100.100 dev eth0
    
  • Set interface IP addresses:

    # ifconfig tun0 10.0.0.1 netmask 255.255.255.252 > pointopoint 10.0.0.1
    
  • Set interface MTU and bring interface up:

    # ifconfig tun0 mtu 1500 up
    




Now we have following interface on the Linux server:
linux:~# ifconfig tun0
tun77     Link encap:IPIP Tunnel  HWaddr
         inet addr:10.0.0.1  P-t-P:10.0.0.2  Mask:255.255.255.252
         UP POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
         RX packets:6 errors:0 dropped:0 overruns:0 frame:0
         TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
         collisions:0 txqueuelen:0
         RX bytes:504 (504.0 b)  TX bytes:624 (624.0 b)
Now, we need to create tunnel point at the FeeeBSD server:
  • Create gif tunnel interface:

    # # ifconfig gif0 create
    
  • Set interface transport IP addresses:

    # gifconfig gif0 inet 200.200.200.200 100.100.100.100
    
  • Set interface IP addresses:

    # ifconfig gif0 10.0.0.2 netmask 255.255.255.252 10.0.0.1
    
  • Set interface MTU and bring interface up:

    # ifconfig gif0 mtu 1500 up
    
The result at the FreeBSD side is following:
# ifconfig gif0
gif0: flags=8051 mtu 1500
       tunnel inet 200.200.200.200 –> 100.100.100.100
       inet 10.0.0.2 –> 10.0.0.1 netmask 0xfffffffc
To check the result we can use ping utility at linux side:
linux:~# ping -c 4 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=0.139 ms
64 bytes from 10.0.0.2: icmp_seq=2 ttl=64 time=0.138 ms
64 bytes from 10.0.0.2: icmp_seq=3 ttl=64 time=0.138 ms
64 bytes from 10.0.0.2: icmp_seq=4 ttl=64 time=0.136 ms

— 172.17.0.1 ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.136/0.137/0.139/0.014 ms
That is all! Now we have “direct” connection between our two servers and we are able to do some routing via this link.
2016/01/14 16:01 2016/01/14 16:01
http://zosel.net/?/trackback/240
from.Shop Mcm Backpack  2016/02/04 15:58
nike frees 3.0 v4
from.Vintage Mcm Bags  2016/02/04 16:06
nike free run print
from.Where To Buy Mcm Online  2016/02/04 17:50
discount nike air max
from.Vintage Mcm Clutch  2016/02/04 18:24
nike cheap
from.Mcm Bag 2014  2016/02/04 18:52
cheap nike clothes for sale
from.Mcm Collection  2016/02/04 19:18
nike sneaker
from.Shop Mcm Backpack  2016/02/04 20:21
nike air max ltd ii
from.Mcm Con  2016/02/04 22:13
2014 nike air max
from.Mcm Handbags For Sale  2016/02/04 22:19
discount nike free run 5.0
from.Mcm Travel Bags  2016/02/04 22:43
nike free run 5.0 v2
from.Ugg E Bay  2016/02/04 22:44
jordan nike shoes for women
from.Ugg In Saldo  2016/02/05 01:08
nike air mens shoes
from.Scarpe Ugg  2016/02/05 01:33
mcm backpack red
from.Ugg Baby  2016/02/05 03:35
shopping nike
from.Vendita Online Ugg  2016/02/05 03:58
mens new nike air max
from.Mcm Electronics Reviews  2016/02/05 04:08
online mcm
from.Mcm Discount Bags  2016/02/05 04:32
nike air max new shoes
from.Ugg Firenze Negozi  2016/02/05 05:01
nike outlet washington dc
from.Mcm Black Backpack  2016/02/05 06:31
nike air max 2013 sneakers
from.Ugg 60 Euro  2016/02/05 07:56
mcm comic con october 2014
from.Ugg Outlet  2016/02/05 07:59
black nike air max 2013
from.Ugg Stivali Uomo  2016/02/05 08:01
nike free run women sale
from.Ugg Wikipedia  2016/02/05 08:18
cheap nike sneakers women
from.Mcm Buy  2016/02/05 08:59
vintage mcm bags
from.Ugg Vendita On Line  2016/02/05 09:08
nike air max acg
from.Mcm T Shirt  2016/02/05 10:05
nike shoe air max
from.Stivali Ugg 2014  2016/02/05 10:15
shoes with nike
from.Mcm Electronics Promo  2016/02/05 10:32
nike shoe store
from.Ugg Stivali Scontati  2016/02/05 11:31
authentic mcm bags
from.Mcm Boston Bag  2016/02/05 12:29
nike air max defy run - mens
from.Ugg Australian  2016/02/05 12:56
womens nike air max 2014
from.E Bay Ugg  2016/02/05 12:58
really cheap nike air max 90
from.Mcm Electronics Location  2016/02/05 13:49
cheap nike and jordan
from.Mcm Catalog  2016/02/05 13:59
buy nike
from.Mcm Backpack Black  2016/02/05 14:18
mens nike free run
from.Ugg Vendita Online Italia  2016/02/05 14:52
nike free run benefits
from.Ugg S  2016/02/05 14:58
tenis nike shox
from.Come Pulire Gli Ugg  2016/02/05 15:11
nike kids free run
from.Ugg Short  2016/02/05 15:20
nike air max 2014 wholesale
from.Scarpe Ugg Sito Ufficiale  2016/02/05 15:34
nike air air max 90
from.Stivali Ugg Donna  2016/02/05 15:49
2013 nike air max shoes
from.Mcm Bags Cheap  2016/02/05 16:34
buy nike air max trainers
from.Ugg Scarpe Donna  2016/02/05 16:38
nike air max 1 id
from.Mcm Clutch  2016/02/05 17:12
cheap mcm bags
from.Mcm Elect  2016/02/05 17:58
nike air max 1
from.Mcm Store  2016/02/05 18:05
blue and white nike air max
from.Mcm Shopper Bag  2016/02/05 18:10
nike air max sneakers cheap
from.Ugg Outlet Online Boots  2016/02/05 18:45
nike air max t zone
from.Ugg Bambini  2016/02/05 18:55
nike online air max
from.Ugg Da Bambina  2016/02/05 19:02
nike outlet in washington dc
from.Mcm Bag Pack  2016/02/05 19:39
nike freeruns
from.Bags Mcm  2016/02/05 22:46
nike running
from.Mcm Luxury  2016/02/05 22:54
nike free run 5.0 black grey
from.Small Mcm Backpack  2016/02/05 22:59
nike air trainers
from.Outlet Ugg Italia  2016/02/05 23:17
costume your own nike shoes
from.Mcm Website  2016/02/06 00:00
nike shoes shops
from.Mcm First Lady  2016/02/06 00:30
where can i get nike shoes cheap
from.Ugg 5825  2016/02/06 03:27
nike outlet williamsburg iowa
from.Mcm Backpack Review  2016/02/06 04:08
shop nike clothing
from.Mcm Factory Outlet  2016/02/06 04:53
nike free run 3.0 womens
from.Mcm Leather Jacket  2016/02/06 10:23
nike 2013 air max cheap
from.Cheap Mcm  Satchels  2016/02/06 10:49
nike free run champs
from.Mcm Outlet Usa  2016/02/06 10:57
mcm backpack women
from.Mcm Wallet Uk  2016/02/06 11:01
nike jordan shoes on sale
from.Vintage Mcm Bags  2016/02/06 11:02
nike id create shoes
from.October Mcm  2016/02/06 14:01
nike free run 5.0 running shoes
from.Mcm Elctronics  2016/02/06 14:13
cheap nike air max uk
from.Mcm Online Store Uk  2016/02/06 17:03
mens 2013 nike air max
from.Mcm Luggage  2016/02/06 17:10
nike free run 5.0 buy online
from.Bags Mcm  2016/02/06 20:16
nike trainers men
from.Mcm Bookbag Price  2016/02/06 21:42
free shipping cheap nike shoes
from.Mcm Sneakers Men  2016/02/06 22:32
mcm backpack online store
from.Mcm Korea Online Shop  2016/02/07 06:27
nike pegasus
from.Ugg Rosa  2016/02/07 07:17
womens nike shox
from.Mcm Stark  2016/02/07 08:36
nike shoes air max 2013
from.Mcm Shoes Men  2016/02/07 08:53
nike air max black mens
from.Ugg S  2016/02/07 08:54
create your own nike shoes free
from.Stivali Pelosi Ugg  2016/02/07 09:41
shop online nike
from.Prezzi Ugg In Italia  2016/02/07 10:18
cheap nike air max shoes china
from.Mcm Electronics Inc  2016/02/07 10:25
nike air max 87
from.Mcm Bag Black  2016/02/07 10:31
nike air max in black
from.Offerta Ugg  2016/02/07 11:05
nike personalized
from.Stivali Simil Ugg  2016/02/07 13:30
cheap wholesale nike air max
from.Mcm White Handbags  2016/02/07 16:29
nike air max light blue
from.Ugg Punti Vendita  2016/02/07 16:49
nike air max latest
from.Ugg Per Bambini  2016/02/07 17:14
free nike running shoes
from.Mcm Online Store  2016/02/07 18:36
new nike air max for women
from.Mcm Backpack Online  2016/02/07 18:37
how to get cheap nike shoes
from.Punti Vendita Ugg Italia  2016/02/07 18:47
nike free run 5.0 cheap
from.Ugg Treviso  2016/02/07 19:06
running shoes nike men
from.Ugg America  2016/02/07 19:37
nike free 3.0 womens
from.Scarpe Ugg Donna  2016/02/07 20:37
nike free running sneakers
from.Ugg Costo  2016/02/07 20:43
nike air max 2013 womens
from.Scarpe Ugg Online  2016/02/07 21:00
nike free run livestrong
from.Ugg Scarpe Donna  2016/02/07 21:11
cheap nike air max 90 womens
from.Ugg Australia Shop Online Italia  2016/02/07 21:39
customize shoes nike
from.Stivali Ugg On Line  2016/02/08 00:18
replica mcm
from.Ugg Outlet Store Online  2016/02/08 00:24
nike free 4.0 women
from.Ugg Padova  2016/02/08 01:13
nike free 3.0 running
from.Boots Ugg Online  2016/02/08 01:47
nike free run 4 v3
from.Mcm Bags Cheap  2016/02/08 02:48
grey nike free run
from.Pantofole Ugg  2016/02/08 07:30
mcm luggage cheap
from.Stivali Ugg Prezzi  2016/02/08 10:48
nike nike air
from.Mcm Bags Price  2016/02/08 11:48
nike outlet online shoes
from.Mcm Online Shopping  2016/02/08 11:55
air max nike store
from.Stivali Ugg Italia  2016/02/08 12:01
nike running shoes for sale
from.Mcm Stores  2016/02/08 15:11
nike free shoes
from.Mcm Handbags For Sale  2016/02/08 15:43
nike air max metallic silver
from.Mcm Clutch Bags  2016/02/08 18:07
nike vomero 6
from.Mcm Clothing Line  2016/02/08 23:22
nike air max for running
from.Mcm Bags Wholesale  2016/02/08 23:44
nike free run 7
from.Mcm Bags Prices  2016/02/08 23:56
nike free runs cheap
from.What Are Mcm Bags  2016/02/09 05:46
nike outlet store conroe tx
from.Mcm Electronics Catalog  2016/02/09 08:01
women nike sneakers
from.Mcm Replica Backpack  2016/02/09 08:13
nike free run tiffany blue
from.Modelli Ugg  2016/02/09 08:36
mcm electronics coupon code
from.Ebay Ugg  2016/02/09 10:16
nike free 1.0
from.Bag Mcm  2016/02/09 11:23
nike all black
from.Mcm Bookbag For Cheap  2016/02/09 11:57
nike air max i
from.Boots Ugg Online  2016/02/09 15:16
nike free run 5.0 2014
from.Mcm Leather Goods  2016/02/09 17:40
buy nike running shoes online
from.Mcm Cognac Backpack  2016/02/09 17:47
nike soccer cleats
from.Mcm Bag Men  2016/02/09 18:18
cheap nike air max for women
from.Mcm Cheap  2016/02/09 18:32
nike footwear
from.Stivali Ugg Vendita Online  2016/02/09 19:37
the nike factory store
from.Ugg Paraorecchie  2016/02/09 20:01
nike customized running shoes
from.Mcm Backpack Sale  2016/02/09 21:25
nike shocks
from.Ugg Su Ebay  2016/02/10 00:31
cheap nike sneakers women
from.Ugg Dove Comprarli  2016/02/10 01:45
cheap nike free run 4.0
from.Stivali Ugg Outlet Online  2016/02/10 03:07
nike store basketball shoes
from.Mcm Backpack Cognac  2016/02/10 04:05
nike air max offers
from.Mcm Latest Collection  2016/02/10 04:28
nike 6.0 shoes
from.Ugg Milano  2016/02/10 04:50
cheap mcm backpacks
from.Spaccio Ugg Milano  2016/02/10 04:58
black white nike air max
from.Ugg Estate  2016/02/10 05:03
cheap nike air jordans
from.Mcm October  2016/02/10 05:47
cheap nike air maxes 90
from.Mcm Backpack  2016/02/10 05:58
nike mercurial miracle
from.Mcm Price  2016/02/10 13:51
nike air max uk
from.Mcm Bag  2016/02/10 13:54
mcm bags for women
from.Ugg Australia Eu  2016/02/10 14:52
custom shoes nike id
from.Ugg Saldi Online  2016/02/10 17:23
men nike air
from.Mcm Belts  2016/02/10 17:24
wholesale 2013 nike air max
from.Ugg Prezzi Scontati  2016/02/10 17:51
nike shop.com
from.Mcm Shoes Online  2016/02/10 22:31
livestrong nike free
from.Ugg Lana  2016/02/10 22:38
nike factory outlet allen tx
from.Mcm Stark  2016/02/10 23:34
fake nike air max shoes
from.Mcm Wallets  2016/02/10 23:39
nike for women shoes
from.Mcm Ele  2016/02/10 23:45
nike plus shoes
from.Ugg Compra Online  2016/02/11 00:12
mcm belt
from.Mcm Bags White  2016/02/11 00:57
nike accessories
from.Ugg Palermo  2016/02/11 02:05
nike acg air max goadome
from.Mcm Accessories  2016/02/11 02:55
the nike outlet store
from.Mcm Sale Uk  2016/02/11 05:43
nike air max black grey
from.Mcm Electronic  2016/02/11 11:28
nike shoes women sale
from.Outlet Ugg Online Italia  2016/02/11 14:23
nike mercurial vapor superfly iii
from.Ugg Saldi Italia  2016/02/11 15:32
nike max air mens shoes
from.Mcm Backpack White  2016/02/11 17:23
nike air max 2013 mens
from.Vintage Mcm Clutch  2016/02/11 17:28
womens nike free running shoes
from.Costo Ugg  2016/02/11 21:15
nike 6.0 braata
from.Sneakers Ugg Australia  2016/02/11 23:41
customize shoes nike
from.Mcm Factory Outlet  2016/02/11 23:45
nike flyknit shoes
from.Ugg Australia Milano  2016/02/12 04:04
nike free run 5.0 womens
from.Mcm Handbags 2014  2016/02/12 04:48
nike blazers
from.Ugg Prezzo Italia  2016/02/12 05:03
mcm design
from.Mcm Bags White  2016/02/12 05:53
nike challenger
from.Ugg Australia Offerte  2016/02/12 06:03
red nike free
from.Ugg Rivenditori Roma  2016/02/12 06:15
nike shoes 5.0
from.Ugg Shop On Line  2016/02/12 08:07
nike store basketball shoes
from.Birmingham Mcm 2014  2016/02/12 08:32
on sale nike shoes
from.Ugg Svizzera  2016/02/12 09:42
nike air max nike air max 90
from.Vintage Mcm Backpack  2016/02/12 11:54
womens nike free 5.0 on sale
from.Mcm Review  2016/02/12 12:02
nike outlet park city
from.Mcm London Location  2016/02/12 12:07
nike shoes 2014 air max
from.What Is Mcm Bag  2016/02/12 14:30
mens nike 2013 air max
from.Mcm Korea Price  2016/02/12 15:21
mcm men bags
from.Shop Mcm  2016/02/12 15:33
the first nike air max
from.Taglie Ugg  2016/02/12 16:05
mcm backpack black
from.Mcm Backpacks Sale  2016/02/12 18:26
nike air max where to buy
from.Mcm Backpack Price Uk  2016/02/13 01:01
nike air max us
from.Mcm Vintage  2016/02/13 01:10
nike free white
from.Cheap Mcm Bags  2016/02/13 01:24
next nike air max
from.Mcm Official Online Shop  2016/02/13 06:11
nike air max shoes for sale
from.Ugg Store Online  2016/02/13 08:51
nike free runs 5.0 v2
from.Ugg Australiani  2016/02/13 09:31
nike golf outlet
from.Ugg Boots Store  2016/02/13 12:59
max nike air shoes
from.Stivali Ugg 2014  2016/02/13 18:09
nike air max womens 2009
from.Mcm Usa  2016/02/13 18:14
mcm bag 2014
from.Mcm Clutch Bag  2016/02/13 20:41
boys white nike air max
from.Mcm Bags Online Shop  2016/02/13 21:53
nike air griffey max 1 for sale
from.Cheap Mcm Bag  2016/02/13 23:48
site nike
from.Mcm Wallet  2016/02/14 00:00
cheap nike and jordan shoes
from.Mcm Products  2016/02/14 00:20
nike women runners
from.Ugg Costo In Italia  2016/02/14 00:45
mcm clothing
from.Mcm Clutch Bags  2016/02/14 06:02
nike sport shoes air max
from.Cheap Mcm Bags  2016/02/14 06:39
latest nike free run
from.Sale Mcm-Bags.Com  2016/02/14 07:57
cheapest nike free 5.0
from.Ugg Da Bambina  2016/02/14 08:18
nike id design search
from.Australia Ugg  2016/02/14 08:51
nike free run black and silver
from.Ugg Australia Outlet Online  2016/02/14 10:48
cheap nike for men
from.Offerte Ugg Boots  2016/02/14 11:01
nike jordan shoes for women
from.Taglie Ugg  2016/02/14 11:30
cheap nike shoes online for sale
from.Ugg Classic  2016/02/14 12:05
nike flyknit online
from.Discount Mcm Handbags  2016/02/14 15:50
nike air max shoes for cheap
from.Mcm Handbags Sale  2016/02/14 18:16
what is mcm comic con
from.Price Of Mcm Bags  2016/02/15 00:17
nike apparel sale
from.Mcm Stark Backpack  2016/02/15 00:24
nike runners women
from.Ugg Con Bottoni  2016/02/15 02:44
nike air max 90 blue
from.Mcm Backpack Women  2016/02/15 05:36
new nike id
from.Ugg Svizzera  2016/02/15 14:53
cheap mcm bags
from.Ugg Australia Scontati  2016/02/16 11:04
nike dunk high
from.Mcm Travel Bags  2016/02/16 23:55
black friday nike outlet
from.Stivali Ugg Italia Outlet  2016/02/20 11:20
nike outlet store legends
from.Mcm Small Backpack  2016/02/20 18:33
nike free running 4.0
from.Mcm Coupons  2016/02/21 04:44
nike outlet black friday
from.Ugg Boots Shop Online  2016/02/21 07:22
nike air max black and black
ZOSEL:Too much is as bad as too little...!! 자공(子貢)이 공자에게 "사(師:子張의 이름)와 상(商:子夏의 이름)은 어느 쪽이 어집니까?" 하고 묻자, 공자는 "사는 지나치고 상은 미치지 못한다"고 대답하였다. "그럼 사가 낫단 말씀입니까?" 하고 반문하자, 공자는 "지나친 것은 미치지 못한 것과 같다(過猶不及)"고 말하였다.
Too much is as bad as too little...!! 자공(子貢)이 공자에게 "사(師:子張의 이름)와 상(商:子夏의 이름)은 어느 쪽이 어집니까?" 하고 묻자, 공자는 "사는 지나치고 상은 미치지 못한다"고 대답하였다. "그럼 사가 낫단 말씀입니까?" 하고 반문하자, 공자는 "지나친 것은 미치지 못한 것과 같다(過猶不及)"고 말하였다.
전체 (209)
리눅스시스템 (92)
윈도우시스템 (16)
프로그램 (7)
네트워크시스템 (7)
최근관심 (1)
«   2018/10   »
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
  1. Ugg Sito  2015
    Ugg Sito
  2. Ugg Online  2015
    Ugg Online
  3. Ugg Boots Outlet Italia  2015
    Ugg Boots Outlet Italia
  1. 2018/02 (1)
  2. 2017/03 (2)
  3. 2016/12 (2)