nat fixes
This commit is contained in:
parent
c408c346a4
commit
d2c19248f2
@ -8,8 +8,8 @@ wifi:
|
|||||||
channel: 6 # Wi-Fi channel (2.4 GHz band, e.g., 6 is common)
|
channel: 6 # Wi-Fi channel (2.4 GHz band, e.g., 6 is common)
|
||||||
|
|
||||||
network:
|
network:
|
||||||
lan_subnet: 192.168.7.0/24
|
lan_subnet: 192.168.73.0/24
|
||||||
lan_gateway: 192.168.7.1/24
|
lan_gateway: 192.168.73.1/24
|
||||||
lan_dns: 8.8.8.8
|
lan_dns: 8.8.8.8
|
||||||
lan_domain: hamhotspot.internal
|
lan_domain: hamhotspot.internal
|
||||||
|
|
||||||
|
|||||||
@ -2,4 +2,4 @@
|
|||||||
Name={{ radio.ax_iface }}
|
Name={{ radio.ax_iface }}
|
||||||
|
|
||||||
[Network]
|
[Network]
|
||||||
Address={{ radio.ip_address }}
|
Address={{ radio.ip_address }}
|
||||||
|
|||||||
@ -28,3 +28,11 @@
|
|||||||
name: hostapd
|
name: hostapd
|
||||||
enabled: true
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
|
|
||||||
|
# Set up NAT
|
||||||
|
- name: Install custom NAT masquerading rule
|
||||||
|
ansible.builtin.copy:
|
||||||
|
dest: /etc/nftables.d/10-ham-hotspot.nft
|
||||||
|
src: nftables/ham-hotspot.nft.j2
|
||||||
|
mode: "0644"
|
||||||
|
notify: Restart nftables
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
table ip nat {
|
||||||
|
chain postrouting {
|
||||||
|
type nat hook postrouting priority srcnat; policy accept;
|
||||||
|
{% for radio in radios %}
|
||||||
|
oif "{{ radio.ax_iface }}" masquerade
|
||||||
|
{% endfor %}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user