From charlesreid1

 
(207 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Setup=
==Step by Step Articles==


==Aptitude update==
All the setup involved for bespin, a Ubuntu 18.04 desktop server.


During installation, we allow setup to join the wifi network. On first boot, the network manager will be running and will be connected to the same wifi network. We will disable network manager eventually, but first get some software.
* [[Ubuntu/Bespin/Initial Setup]] - initial setup of the Ubuntu machine


<pre>
* [[Ubuntu/Bespin/Gnome Setup]] - setting up gnome on the Ubuntu machine
sudo apt-get update
sudo apt-get -y install vim gnome-tweak-tool net-tools
</pre>


Set caps lock as a control key.
* [[Ubuntu/Bespin/Ansible]] - setting up and running an Ansible role for the machine


==Configure Manual Wifi==
* [[Ubuntu/Bespin/PIA]] - set up a [[PIA]] VPN tunnel using [[OpenVPN]]


We want to configure wifi manually, and disable the network manager. This requires some preparation to manually join a wifi network with wpa supplicant.
* [[Ubuntu/Bespin/DNS]] - removing the built-in DNS server on Ubuntu and replacing it with dnsmasq


First set your wpa supplicant to join a wifi network.
* [[Ubuntu/Bespin/PiHole]] - run an instance of PiHole, the DNS sinkhole, in a Docker container; install it between dnsmasq and the VPN tunnel, so all DNS queries will pass through the PiHole


<code>/etc/wpa_supplicant/wpa_supplicant.conf</code>
* [[Ubuntu/Bespin/Iptables]] - Update the iptables rules to allow better protection of the server and be less permissive


<pre>
* [[Ubuntu/Bespin/TIL]] - the summary of "today I learned" things that I learned while setting up Bespin
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1


network={
==Related Articles==
    ssid="yournetworkhere"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    psk="yourpskhere"
}
</pre>


Next add the 2 usb wifi devices to network interfaces file. The following etc network interfaces file assumes that wlan0 will be joining an existing wifi network, and wlan1 will be in manual mode so it can be used as an AP.
* [[Ubuntu/OpenVPN Server]] - set up an OpenVPN server on a Ubuntu machine (not running on bespin)


<code>/etc/network/interfaces</code>
==Old Irrelevant Articles==


<pre>
Articles that are no longer relevant to bespin but that may have useful information for some future project.
allow-hotplug wlan0
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface wlan0 inet dhcp


allow-hotplug wlan1
* <s>[[Ubuntu/Bespin/Second AP Tunnel]]</s> - this ended in failure, twice. short version: you can't have multiple simultaneous PIA tunnels in OpenVPN without significant extra configuration, so no need to go this above and beyond.
iface wlan1 inet static
    address 192.168.10.1
    netmask 255.255.255.0
    gateway 192.168.10.1
</pre>


except actually the iface names were dependent on the mac addresses of the wifi cards.
* <s>[[Ubuntu/Bespin/Wifi Repeater]]</s> - using bespin to run hostapd and make a wifi repeater


Finally, start up the wpa supplicant on boot by putting the invocation line in rc.local:
* <s>[[Ubuntu/Bespin/Old/Wifi AP Setup]]</s>  set up a wireless AP to create/host a wifi hotspot on the machine


<code>/etc/rc.local</code>
* <s>[[Ubuntu/Bespin/Old/AP PIA Tunnel]]</s> - route traffic from a wireless AP to a PIA VPN tunnel


<pre>
* <s>[[Ubuntu/Bespin/Old/Iptables]]</s> - old iptables rules for things that aren't actually running on Bespin
/sbin/ifconfig wlan0 down
/bin/sleep 3
/sbin/ifconfig wlan0 up
/bin/sleep 3
/sbin/wpa_supplicant -i wlan0 -D nl80211,wext -c /etc/wpa_supplicant/wpa_supplicant.conf
</pre>


Set permissions:
<pre>
chmod 744 /etc/rc.local
</pre>
Enable rc.local by creating a startup service:
<code>/etc/systemd/system/rc-local.service</code>
<pre>
[Unit]
Description=/etc/rc.local Compatibility
ConditionPathExists=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
</pre>
Now enable the service that was just created:
<pre>
sudo systemctl enable rc-local
</pre>
==Disable Network Manager==
Next step is to disable the network manager.
<pre>
sudo systemctl disable network-manager
sudo systemctl stop network-manager
</pre>
Don't uninstall it, because that will uninstall a bunch of other important gnome packages and you'll be left with a stupid broken ubuntu.
==Tweaking Gnome==
Now tweak it:
* Tweak tools
* Set up like a mac
* plank and startup service
* albert and startup service




Line 120: Line 42:
[[Category:Ubuntu]]
[[Category:Ubuntu]]
[[Category:Linux]]
[[Category:Linux]]
[[Category:Unix]]
[[Category:Machine]]
[[Category:Machine]]
[[Category:Bespin]]

Latest revision as of 05:38, 19 August 2020

Step by Step Articles

All the setup involved for bespin, a Ubuntu 18.04 desktop server.

  • Ubuntu/Bespin/DNS - removing the built-in DNS server on Ubuntu and replacing it with dnsmasq
  • Ubuntu/Bespin/PiHole - run an instance of PiHole, the DNS sinkhole, in a Docker container; install it between dnsmasq and the VPN tunnel, so all DNS queries will pass through the PiHole
  • Ubuntu/Bespin/Iptables - Update the iptables rules to allow better protection of the server and be less permissive
  • Ubuntu/Bespin/TIL - the summary of "today I learned" things that I learned while setting up Bespin

Related Articles

Old Irrelevant Articles

Articles that are no longer relevant to bespin but that may have useful information for some future project.

  • Ubuntu/Bespin/Second AP Tunnel - this ended in failure, twice. short version: you can't have multiple simultaneous PIA tunnels in OpenVPN without significant extra configuration, so no need to go this above and beyond.