Skip to content

Commit a865172

Browse files
committed
readme
1 parent 9790d31 commit a865172

File tree

1 file changed

+22
-19
lines changed

1 file changed

+22
-19
lines changed

README.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Internet----(eth0/wlan0)-Linux-(virtual interface)-----VM/container
6666

6767
1-file-script. Release on [Linux-router repo on Github](https://github.com/garywill/linux-router). Just download and run the bash script (meet the dependencies). In this case use without installation.
6868

69-
> I'm currently not packaging for any distro. If you do, open a PR and add the link (can be with a version badge) to list here
69+
I'm currently not packaging for any distro. If you do, open a PR and add the link (can be with a version badge) to list here
7070

7171
| Linux distro | |
7272
| ------------ | ---------------------------------------------------------------------------------------------------------- |
@@ -91,15 +91,15 @@ Internet----(eth0/wlan0)-Linux-(virtual interface)-----VM/container
9191

9292
### Provide Internet to an interface
9393

94-
```
94+
```bash
9595
sudo lnxrouter -i eth1
9696
```
9797

9898
no matter which interface (other than `eth1`) you're getting Internet from.
9999

100100
### Create WiFi hotspot
101101

102-
```
102+
```bash
103103
sudo lnxrouter --ap wlan0 MyAccessPoint -p MyPassPhrase
104104
```
105105

@@ -111,14 +111,14 @@ Clients access Internet through only `isp5`
111111

112112
<details>
113113

114-
```
114+
```bash
115115
sudo lnxrouter -i eth1 -o isp5 --no-dns --dhcp-dns 1.1.1.1 -6 --dhcp-dns6 [2606:4700:4700::1111]
116116
```
117117

118118
> In this case of usage, it's recommended to:
119119
>
120120
> 1. Stop serving local DNS
121-
> 2. Tell clients which DNS to use ISP5's DNS. (Or, a safe public DNS, like above example)
121+
> 2. Tell clients which DNS to use (ISP5's DNS. Or, a safe public DNS, like above example)
122122
123123
> Also, read *Notice 1*
124124
@@ -128,8 +128,11 @@ sudo lnxrouter -i eth1 -o isp5 --no-dns --dhcp-dns 1.1.1.1 -6 --dhcp-dns6 [26
128128

129129
<details>
130130

131-
```
131+
```bash
132132
sudo lnxrouter -n -i eth1
133+
```
134+
135+
```bash
133136
sudo lnxrouter -n --ap wlan0 MyAccessPoint -p MyPassPhrase
134137
```
135138

@@ -143,7 +146,7 @@ sudo lnxrouter -n --ap wlan0 MyAccessPoint -p MyPassPhrase
143146

144147
Create a bridge
145148

146-
```
149+
```bash
147150
sudo brctl addbr lxcbr5
148151
```
149152

@@ -156,7 +159,7 @@ lxc.network.link = lxcbr5
156159
lxc.network.hwaddr = xx:xx:xx:xx:xx:xx
157160
```
158161

159-
```
162+
```bash
160163
sudo lnxrouter -i lxcbr5
161164
```
162165

@@ -168,7 +171,7 @@ All clients' Internet traffic go through, for example, Tor (notice this example
168171

169172
<details>
170173

171-
```
174+
```bash
172175
sudo lnxrouter -i eth1 --tp 9040 --dns 9053 -g 192.168.55.1 -6 --p6 fd00:5:6:7::
173176
```
174177

@@ -193,7 +196,7 @@ To not give our infomation to clients. Clients can still access Internet.
193196

194197
<details>
195198

196-
```
199+
```bash
197200
sudo lnxrouter -i eth1 \
198201
--tp 9040 --dns 9053 \
199202
--random-mac \
@@ -211,13 +214,13 @@ sudo lnxrouter -i eth1 \
211214

212215
Create a bridge
213216

214-
```
217+
```bash
215218
sudo brctl addbr lxdbr5
216219
```
217220

218221
Create and add a new LXD profile overriding container's `eth0`
219222

220-
```
223+
```bash
221224
lxc profile create profile5
222225
lxc profile edit profile5
223226

@@ -235,27 +238,27 @@ name: profile5
235238
lxc profile add <container> profile5
236239
```
237240

238-
```
241+
```bash
239242
sudo lnxrouter -i lxdbr5 --tp 9040 --dns 9053
240243
```
241244

242245
To remove that new profile from container
243246

244-
```
247+
```bash
245248
lxc profile remove <container> profile5
246249
```
247250

248251
#### To not use profile
249252

250253
Add new `eth0` to container overriding default `eth0`
251254

252-
```
255+
```bash
253256
lxc config device add <container> eth0 nic name=eth0 nictype=bridged parent=lxdbr5
254257
```
255258

256259
To remove the customized `eth0` to restore default `eth0`
257260

258-
```
261+
```bash
259262
lxc config device remove <container> eth0
260263
```
261264

@@ -267,7 +270,7 @@ lxc config device remove <container> eth0
267270

268271
In VirtualBox's global settings, create a host-only network `vboxnet5` with DHCP disabled.
269272

270-
```
273+
```bash
271274
sudo lnxrouter -i vboxnet5 --tp 9040 --dns 9053
272275
```
273276

@@ -279,11 +282,11 @@ sudo lnxrouter -i vboxnet5 --tp 9040 --dns 9053
279282

280283
Create a bridge
281284

282-
```
285+
```bash
283286
sudo brctl addbr firejail5
284287
```
285288

286-
```
289+
```bash
287290
sudo lnxrouter -i firejail5 -g 192.168.55.1 --tp 9040 --dns 9053
288291
firejail --net=firejail5 --dns=192.168.55.1 --blacklist=/var/run/nscd
289292
```

0 commit comments

Comments
 (0)