-change hosts file - will maintain hosts file on multipe machines.

for the scope of this type of demo network, this is much simpler
than installing and managing dns.
This commit is contained in:
Pi
2019-03-14 12:55:33 -04:00
parent 0e8a36b1a4
commit 23915d0549
13 changed files with 89 additions and 30 deletions

View File

@@ -0,0 +1,15 @@
interface=wlan0
driver=nl80211
hw_mode=g
channel=6
ieee80211n=1
wmm_enabled=1
ht_capab=[HT40][SHORT-GI-20][DSSS_CCK-40]
macaddr_acl=0
ignore_broadcast_ssid=0
wpa=2
auth_algs=1
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP
ssid=PHLIPAMT
wpa_passphrase=dsfinisdemo

View File

@@ -0,0 +1,18 @@
# Generated by iptables-save v1.6.0 on Thu Mar 14 09:59:15 2019
*filter
:INPUT ACCEPT [7056:1877085]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [6972:1880076]
-A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i wlan0 -o eth0 -j ACCEPT
COMMIT
# Completed on Thu Mar 14 09:59:15 2019
# Generated by iptables-save v1.6.0 on Thu Mar 14 09:59:15 2019
*nat
:PREROUTING ACCEPT [15:3832]
:INPUT ACCEPT [15:3832]
:OUTPUT ACCEPT [110:30472]
:POSTROUTING ACCEPT [106:29680]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Thu Mar 14 09:59:15 2019

View File

@@ -6,27 +6,14 @@
state: absent
purge: true
tags: remove_wpasupplicant
- lineinfile:
path: /etc/snmp/snmpd.conf
state: present
backrefs: yes
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
with_items:
- { regexp: '^\s+rocommunity\s+public\s+default\s+-V\s+systemonly', line: ' rocommunity {{ rocommunity }}' }
- { regexp: '^agentAddress\s+udp:127.0.0.1:161', line: 'agentAddress udp:161' }
tags: configure_snmpd
become: true
- name: enable snmpd service and ensure it is not masked
systemd:
name: snmpd
enabled: yes
masked: no
state: restarted
tags: enablestart_snmpd
become: true
- name: set timezone
become: true
timezone:
name: America/New_York
tags: set_timezone
# configure wlan0
# install hostapd
# configure hostapd
# /etc/default/hostapd
# enable hostapd
# install dnsmasq
# configure dnsmasq
# enable dnsmasq
# enable ipv4.forwarding
# copy fw config
# iptables-restore to rc.local