-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:
15
roles/wifi/files/hostapd.conf
Normal file
15
roles/wifi/files/hostapd.conf
Normal 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
|
||||
18
roles/wifi/files/iptables.ipv4.nat
Normal file
18
roles/wifi/files/iptables.ipv4.nat
Normal 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
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user