FFRL Internet Exit: move IPv4 NAT address to a single dummy interface
This commit is contained in:
parent
cc43741a91
commit
94da0613a4
4 changed files with 16 additions and 3 deletions
|
@ -5,3 +5,9 @@
|
|||
dest: "/etc/network/interfaces.d/{{ item.key }}"
|
||||
notify: reload network interfaces
|
||||
with_dict: "{{ ffrl_exit_server }}"
|
||||
|
||||
- name: create ffrl-nat dummy interface
|
||||
template:
|
||||
src: ffrl_nat.j2
|
||||
dest: "/etc/network/interfaces.d/ffrl-nat"
|
||||
notify: reload network interfaces
|
||||
|
|
|
@ -13,4 +13,3 @@ iface {{ item.key }} inet tunnel
|
|||
|
||||
address {{ item.value.tunnel_ipv4_network | ipaddr('net') | ipaddr('1') | ipaddr('address') }}/{{ item.value.tunnel_ipv4_network | ipaddr('net') | ipaddr('prefix') }}
|
||||
address {{ item.value.tunnel_ipv6_network | ipaddr('net') | ipaddr('2') | ipaddr('address') }}/{{ item.value.tunnel_ipv6_network | ipaddr('net') | ipaddr('prefix') }}
|
||||
address {{ ffrl_public_ipv4_nat | ipaddr('address') }}/{{ ffrl_public_ipv4_nat | ipaddr('prefix') }}
|
||||
|
|
7
roles/network-ffrl/templates/ffrl_nat.j2
Normal file
7
roles/network-ffrl/templates/ffrl_nat.j2
Normal file
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# {{ ansible_managed }}
|
||||
#
|
||||
auto ffrl-nat
|
||||
iface ffrl-nat
|
||||
link-type dummy
|
||||
address {{ ffrl_public_ipv4_nat | ipaddr('address') }}/{{ ffrl_public_ipv4_nat | ipaddr('prefix') }}
|
|
@ -36,9 +36,10 @@ filter ebgp_ffrl_export_filter {
|
|||
}
|
||||
|
||||
# Protocols
|
||||
protocol static ffrl_uplink_hostroute {
|
||||
protocol direct ffrl_nat {
|
||||
table ffrl;
|
||||
route {{ ffrl_public_ipv4_nat | ipaddr('address') }}/{{ ffrl_public_ipv4_nat | ipaddr('prefix') }} reject;
|
||||
interface "ffrl-nat";
|
||||
import where is_ffrl_nat();
|
||||
}
|
||||
|
||||
protocol direct ffrl_tunnels {
|
||||
|
|
Loading…
Reference in a new issue