aboutsummaryrefslogtreecommitdiffstats
path: root/core/network.html
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2016-10-03 22:48:38 +0100
committerSilvino Silva <silvino@bk.ru>2016-10-03 22:49:20 +0100
commitc30b14dbcfb60418a0d7fd050a096c9bc20a380b (patch)
tree0aa945da5a98a0a1d837ff55338800d0a46db820 /core/network.html
parentcf0657e1b62b59e2f54bc0cb88870c4db1e36769 (diff)
parente6d81cddaba6e3a1583a193ddf1b7405fbdd9889 (diff)
downloaddoc-c30b14dbcfb60418a0d7fd050a096c9bc20a380b.tar.gz
Release 0.2.3
Diffstat (limited to 'core/network.html')
-rw-r--r--core/network.html123
1 files changed, 83 insertions, 40 deletions
diff --git a/core/network.html b/core/network.html
index 04f1266..b8b7617 100644
--- a/core/network.html
+++ b/core/network.html
@@ -23,11 +23,87 @@
connection to router and add as default gateway.</dd>
</dl>
- <p>If is first boot after install configure iptables and
- one of above described scripts then proceed to upgrade your
- system.</p>
+ <p>If is first boot after install configure iptables and
+ one of above described scripts then proceed to upgrade your
+ system.</p>
- <h2 id="iptables">2.1.1. Iptables</h2>
+ <h2 id="resolv">2.1.1. Resolver</h2>
+
+ <p>Configure your resolver with a server that don't censorship there for
+ respect your freedom and privacy. Read
+ <a href="https://trac.torproject.org/projects/tor/wiki/doc/DnsResolver/PublicDnsResolvers#PublicDNSServers">Tor Dns Resolver</a>
+ for more information. This example will use
+ <a href="http://www.chaoscomputerclub.de/en/censorship/dns-howto">Chaos Computer Club</a>
+ server, edit /etc/resolv.conf and make it immutable;</p>
+
+ <pre>
+ # /etc/resolv.conf.head can replace this line
+ nameserver 213.73.91.35
+ # /etc/resolv.conf.tail can replace this line
+ </pre>
+
+ <pre>
+ # chattr +i /etc/resolv.conf
+ </pre>
+
+ <h2 id="static">2.1.2. Static IP</h2>
+
+ <p>Current example of <a href="conf/rc.d/net">/etc/rc.d/net</a>;</p>
+
+ <pre>
+ Address: 10.0.0.1 00001010.00000000.00000000 .00000001
+ Netmask: 255.255.255.0 = 24 11111111.11111111.11111111 .00000000
+ Wildcard: 0.0.0.255 00000000.00000000.00000000 .11111111
+ =>
+ Network: 10.0.0.0/24 00001010.00000000.00000000 .00000000 (Class A)
+ Broadcast: 10.0.0.255 00001010.00000000.00000000 .11111111
+ HostMin: 10.0.0.1 00001010.00000000.00000000 .00000001
+ HostMax: 10.0.0.254 00001010.00000000.00000000 .11111110
+ Hosts/Net: 254 (Private Internet)
+ </pre>
+
+ <pre>
+ # DEV=enp8s0
+ # ADDR=10.0.0.1
+ # MASK=24
+ # GW=10.0.0.1
+ # ip addr flush dev ${DEV}
+ # ip route flush dev ${DEV}
+ </pre>
+
+ <pre>
+ # ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast +
+ # ip link set ${DEV} up
+ </pre>
+
+ <p>Script don't add above network as gateway;</p>
+
+ <pre>
+ # ip route add default via ${GW}
+ </pre>
+
+ <p>Other IP class used in home setups;</p>
+
+ <pre>
+ Address: 192.168.0.1 11000000.10101000.00000000 .00000001
+ Netmask: 255.255.255.0 = 24 11111111.11111111.11111111 .00000000
+ Wildcard: 0.0.0.255 00000000.00000000.00000000 .11111111
+ =>
+ Network: 192.168.0.0/24 11000000.10101000.00000000 .00000000 (Class C)
+ Broadcast: 192.168.0.255 11000000.10101000.00000000 .11111111
+ HostMin: 192.168.0.1 11000000.10101000.00000000 .00000001
+ HostMax: 192.168.0.254 11000000.10101000.00000000 .11111110
+ Hosts/Net: 254 (Private Internet)
+ </pre>
+
+ <pre>
+ # DEV=enp8s0
+ # ADDR=192.168.1.1
+ # MASK=24
+ # GW=192.168.1.254
+ </pre>
+
+ <h2 id="iptables">2.1.3. Iptables</h2>
<p>For more information about iptables read
<a href="https://wiki.archlinux.org/index.php/Iptables">arch wiki</a>.
@@ -65,39 +141,6 @@
</pre>
<p>
- <h2 id="resolv">2.1.2. Resolver</h2>
-
- <p>Configure your resolver with a server that don't censorship there for
- respect your freedom and privacy. Read
- <a href="https://trac.torproject.org/projects/tor/wiki/doc/DnsResolver/PublicDnsResolvers#PublicDNSServers">Tor Dns Resolver</a>
- for more information. This example will use
- <a href="http://www.chaoscomputerclub.de/en/censorship/dns-howto">Chaos Computer Club</a>
- server, edit /etc/resolv.conf and make it immutable;</p>
-
- <pre>
- # /etc/resolv.conf.head can replace this line
- nameserver 213.73.91.35
- # /etc/resolv.conf.tail can replace this line
- </pre>
-
- <pre>
- # chattr +i /etc/resolv.conf
- </pre>
-
- <h2 id="static">2.1.3. Static IP</h2>
-
- <pre>
- # ip link
- # ip addr flush dev ${DEV}
- # ip route flush dev ${DEV}
- </pre>
-
- <pre>
- # ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast +
- # ip link set ${DEV} up
- # ip route add default via ${GW}
- </pre>
-
<h2 id="wpa">2.1.4. Wpa and dhcpd</h2>
@@ -144,10 +187,10 @@
</pre>
<p>Use <a href="conf/rc.d/wlan">/etc/rc.d/wlan</a>
- init script to auto load wpa configuration and dhcp
+ init script to auto load wpa configuration and dhcp
client.</p>
- <h3>2.1.4.2. Wpa Cli</h3>
+ <h3>2.1.4.2. Wpa Cli</h3>
<pre>
# wpa_cli
@@ -302,7 +345,7 @@
<p>Change to act as a router (default of conf/sysctl.conf);</p>
<pre>
- # Act as a router, necessary for Access Point
+ # Act as a router, necessary for Access Point
net.ipv4.ip_forward = 1
net.ipv4.conf.all.send_redirects = 1
net.ipv4.conf.default.send_redirects = 1