@@ -66,7 +66,7 @@ Internet----(eth0/wlan0)-Linux-(virtual interface)-----VM/container
66
66
67
67
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.
68
68
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
70
70
71
71
| Linux distro | |
72
72
| ------------ | ---------------------------------------------------------------------------------------------------------- |
@@ -91,15 +91,15 @@ Internet----(eth0/wlan0)-Linux-(virtual interface)-----VM/container
91
91
92
92
### Provide Internet to an interface
93
93
94
- ```
94
+ ``` bash
95
95
sudo lnxrouter -i eth1
96
96
```
97
97
98
98
no matter which interface (other than ` eth1 ` ) you're getting Internet from.
99
99
100
100
### Create WiFi hotspot
101
101
102
- ```
102
+ ``` bash
103
103
sudo lnxrouter --ap wlan0 MyAccessPoint -p MyPassPhrase
104
104
```
105
105
@@ -111,14 +111,14 @@ Clients access Internet through only `isp5`
111
111
112
112
<details >
113
113
114
- ```
114
+ ``` bash
115
115
sudo lnxrouter -i eth1 -o isp5 --no-dns --dhcp-dns 1.1.1.1 -6 --dhcp-dns6 [2606:4700:4700::1111]
116
116
```
117
117
118
118
> In this case of usage, it's recommended to:
119
119
>
120
120
> 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)
122
122
123
123
> Also, read * Notice 1*
124
124
@@ -128,8 +128,11 @@ sudo lnxrouter -i eth1 -o isp5 --no-dns --dhcp-dns 1.1.1.1 -6 --dhcp-dns6 [26
128
128
129
129
<details >
130
130
131
- ```
131
+ ``` bash
132
132
sudo lnxrouter -n -i eth1
133
+ ```
134
+
135
+ ``` bash
133
136
sudo lnxrouter -n --ap wlan0 MyAccessPoint -p MyPassPhrase
134
137
```
135
138
@@ -143,7 +146,7 @@ sudo lnxrouter -n --ap wlan0 MyAccessPoint -p MyPassPhrase
143
146
144
147
Create a bridge
145
148
146
- ```
149
+ ``` bash
147
150
sudo brctl addbr lxcbr5
148
151
```
149
152
@@ -156,7 +159,7 @@ lxc.network.link = lxcbr5
156
159
lxc.network.hwaddr = xx:xx:xx:xx:xx:xx
157
160
```
158
161
159
- ```
162
+ ``` bash
160
163
sudo lnxrouter -i lxcbr5
161
164
```
162
165
@@ -168,7 +171,7 @@ All clients' Internet traffic go through, for example, Tor (notice this example
168
171
169
172
<details >
170
173
171
- ```
174
+ ``` bash
172
175
sudo lnxrouter -i eth1 --tp 9040 --dns 9053 -g 192.168.55.1 -6 --p6 fd00:5:6:7::
173
176
```
174
177
@@ -193,7 +196,7 @@ To not give our infomation to clients. Clients can still access Internet.
193
196
194
197
<details >
195
198
196
- ```
199
+ ``` bash
197
200
sudo lnxrouter -i eth1 \
198
201
--tp 9040 --dns 9053 \
199
202
--random-mac \
@@ -211,13 +214,13 @@ sudo lnxrouter -i eth1 \
211
214
212
215
Create a bridge
213
216
214
- ```
217
+ ``` bash
215
218
sudo brctl addbr lxdbr5
216
219
```
217
220
218
221
Create and add a new LXD profile overriding container's ` eth0 `
219
222
220
- ```
223
+ ``` bash
221
224
lxc profile create profile5
222
225
lxc profile edit profile5
223
226
@@ -235,27 +238,27 @@ name: profile5
235
238
lxc profile add < container> profile5
236
239
```
237
240
238
- ```
241
+ ``` bash
239
242
sudo lnxrouter -i lxdbr5 --tp 9040 --dns 9053
240
243
```
241
244
242
245
To remove that new profile from container
243
246
244
- ```
247
+ ``` bash
245
248
lxc profile remove < container> profile5
246
249
```
247
250
248
251
#### To not use profile
249
252
250
253
Add new ` eth0 ` to container overriding default ` eth0 `
251
254
252
- ```
255
+ ``` bash
253
256
lxc config device add < container> eth0 nic name=eth0 nictype=bridged parent=lxdbr5
254
257
```
255
258
256
259
To remove the customized ` eth0 ` to restore default ` eth0 `
257
260
258
- ```
261
+ ``` bash
259
262
lxc config device remove < container> eth0
260
263
```
261
264
@@ -267,7 +270,7 @@ lxc config device remove <container> eth0
267
270
268
271
In VirtualBox's global settings, create a host-only network ` vboxnet5 ` with DHCP disabled.
269
272
270
- ```
273
+ ``` bash
271
274
sudo lnxrouter -i vboxnet5 --tp 9040 --dns 9053
272
275
```
273
276
@@ -279,11 +282,11 @@ sudo lnxrouter -i vboxnet5 --tp 9040 --dns 9053
279
282
280
283
Create a bridge
281
284
282
- ```
285
+ ``` bash
283
286
sudo brctl addbr firejail5
284
287
```
285
288
286
- ```
289
+ ``` bash
287
290
sudo lnxrouter -i firejail5 -g 192.168.55.1 --tp 9040 --dns 9053
288
291
firejail --net=firejail5 --dns=192.168.55.1 --blacklist=/var/run/nscd
289
292
```
0 commit comments