Socat » История » Версия 1
Андрей Волков, 2015-04-13 16:23
1 | 1 | Андрей Волков | h1. Socat |
---|---|---|---|
2 | |||
3 | h2. На сервере |
||
4 | |||
5 | <pre> |
||
6 | ip tuntap add dev tap0 mode tap |
||
7 | ip link set up dev tap0 |
||
8 | socat UDP4-LISTEN:5555,bind=79.172.39.68,reuseaddr,fork TUN:10.1.1.2/30,iff-up,tun-name=tap0,tun-type=tap,iff-promisc & |
||
9 | sleep .1 |
||
10 | ip addr flush dev tap0 |
||
11 | brctl addif ilan0 tap0 |
||
12 | </pre> |
||
13 | |||
14 | h2. На клиенте |
||
15 | |||
16 | <pre> |
||
17 | ip tuntap add dev tap0 mode tap |
||
18 | ip link set up dev tap0 |
||
19 | socat UDP:79.172.39.68:5555 TUN:10.1.1.1/30,iff-up,tun-name=tap0,tun-type=tap,iff-promisc & |
||
20 | sleep .1 |
||
21 | ip addr flush dev tap0 |
||
22 | brctl addif ilan0 tap0 |
||
23 | </pre> |