feat(netbird_exit_node): enable IPv6 for Xray cascade while blocking NetBird 51820/udp over IPv6
This commit is contained in:
1 parent
c064d518d1
commit
9734f5b9e8
1 file changed
+11
-5
@@ -7,8 +7,8 @@
|
||||
net.ipv4.conf.all.src_valid_mark = 1
|
||||
net.ipv4.conf.all.rp_filter = 2
|
||||
net.ipv4.conf.default.rp_filter = 2
|
||||
net.ipv6.conf.all.disable_ipv6 = 1
|
||||
net.ipv6.conf.default.disable_ipv6 = 1
|
||||
net.ipv6.conf.all.disable_ipv6 = 0
|
||||
net.ipv6.conf.default.disable_ipv6 = 0
|
||||
net.core.default_qdisc = fq
|
||||
net.ipv4.tcp_congestion_control = bbr
|
||||
owner: root
|
||||
@@ -21,10 +21,16 @@
|
||||
when: netbird_exit_sysctl is changed
|
||||
changed_when: true
|
||||
|
||||
- name: Разрешить порт WireGuard NetBird (51820/udp) для прямого P2P и Exit Node
|
||||
ansible.builtin.command: ufw allow 51820/udp
|
||||
- name: Разрешить порт WireGuard NetBird (51820/udp) только по IPv4
|
||||
ansible.builtin.command: "{{ item }}"
|
||||
loop:
|
||||
- ufw delete allow 51820/udp
|
||||
- ufw allow proto udp from any to 0.0.0.0/0 port 51820
|
||||
- ufw deny in proto udp from ::/0 to ::/0 port 51820
|
||||
- ufw deny out proto udp from ::/0 to ::/0 port 51820
|
||||
register: ufw_netbird_wg
|
||||
changed_when: "'added' in (ufw_netbird_wg.stdout | lower)"
|
||||
changed_when: "'added' in (ufw_netbird_wg.stdout | lower) or 'deleted' in (ufw_netbird_wg.stdout | lower)"
|
||||
failed_when: false
|
||||
|
||||
- name: Клиент NetBird на ноде
|
||||
ansible.builtin.include_role:
|
||||
|
||||
Reference in new issue
Block a user