public
Description: lightweight network sharing - share your mobile connection via wifi
Homepage: http://github.com/stef/wshare/wikis
Clone URL: git://github.com/stef/wshare.git
Click here to lend your support to: wshare and make a donation at www.pledgie.com !
wshare / README
100644 93 lines (66 sloc) 3.289 kb
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
wshare
======
 
   wshare is a simple program to share an existing network connection. There are
   two modes, *master* and *client*. The master shares an existing network
   connection (probably to the internet) via an unused wireless device. The client
   can connect either via the operating system provided facilities or this script
   in client mode - which is the default. To enable a master supply the the *-m*
   parameter to the script.
 
   wshare is currently *linux only*, released under the *GPLv3* and avaible via git:
   git clone git://github.com/stef/wshare.git
 
   the script itself is very short,
   "download it directly":http://github.com/stef/wshare/tarball/v1.0.1
 
behind the scenes
 
   In master mode (*-m*),
   # the wireless device is switched to ad-hoc mode
   # the essid is set
   # optionally - an encryption key is set (*experimental* WEP only currently)
   # the device is brought up via _ifconfig_
   # NAT is set up
   # dhcpd3 server is configured and brought up to provide network and nameserver settings.
 
   In client mode,
   # the wireless device is switched to ad-hoc mode
   # the essid is set
   # optionally - an encryption key is set (*experimental* WEP only currently)
   # the device is brought up via _ifconfig_
   # dhclient is run to retrieve shared network information from the Master dhcpd3 server
 
example
 
   to share a network, either set the parameters in the config file, or adapt the call below:
      # wshare -m -o ppp0 -i eth0
   the important switch is *-m*, which is necessary for enabling the master mode.
 
   to connect to such a shared network simply call
      # wshare -i eth0
   or you could use NetworkManager under linux, or your operating system provided facilities.
 
Common settings
 
   the following parameters are to be set either via a configuration file
   (/etc/wshare.conf, ~/.wshare.conf or in the same directory where the wshare
   script is located) or or superseding these via command line parameters.
 
   Common parameters are necessary for both master and client operation.
 
      innet
 
      set internal network, over which the external is shared. this **must** be a
      wireless device, if none is set, the script tries to use the first device from
      /proc/net/wireless.
      * default: ath0
      * command line: -i <device>
 
      essid
 
      set the essid of the shared network master
      * default: wshared
      * command line: -e <essid>
 
      key
 
      specify the key for WEP encryption of the internal network. beware this is yet untested and probably not working
      * default: unset
      * command line: -k <key>
 
   Master settings
 
      these settings are only necessary for nodes acting as masters.
 
      subnet
 
      specify the subnet of the internal network. this must be in the /24 range currently... thus it is only possible to specify networks with 3 of four octets
      * default: 10.17.17
      * command line: -n <X.X.X>
 
      exnet
 
      specify which network to share, this is the device that connects to the internet
      * default: ppp0
      * command line: -o <device>
 
      ownip
 
      specify Master IP address, defaults to <subnet>.1
      * default: 10.17.17.1
      * command line: -a <X.X.X.X>