Révision a0d5c724
Test masquerade default proto
spec/classes/masquerade_spec.rb | ||
---|---|---|
16 | 16 |
'masquerade_eth1_vpn': |
17 | 17 |
oif => 'eth1', |
18 | 18 |
saddr => '192.0.2.0/24'; |
19 |
'masquerade_ssh_gitlab':
|
|
19 |
'masquerade_ssh': |
|
20 | 20 |
saddr => '192.0.2.0/24', |
21 | 21 |
daddr => '198.51.100.2', |
22 | 22 |
proto => 'tcp', |
23 | 23 |
dport => '22'; |
24 |
'masquerade_ssh_gitlab': |
|
25 |
saddr => '192.0.2.0/24', |
|
26 |
daddr => '198.51.100.2', |
|
27 |
dport => '22'; |
|
24 | 28 |
'masquerade_wireguard': |
25 | 29 |
proto => 'udp', |
26 | 30 |
dport => '51820'; |
... | ... | |
62 | 66 |
:content => /^ oifname eth1 ip saddr 192\.0\.2\.0\/24 masquerade$/, |
63 | 67 |
:order => '70', |
64 | 68 |
)} |
69 |
it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-masquerade_ssh').with( |
|
70 |
:target => 'nftables-ip-nat-chain-POSTROUTING', |
|
71 |
:content => /^ ip saddr 192\.0\.2\.0\/24 ip daddr 198.51.100.2 tcp dport 22 masquerade$/, |
|
72 |
:order => '70', |
|
73 |
)} |
|
65 | 74 |
it { is_expected.to contain_concat__fragment('nftables-ip-nat-chain-POSTROUTING-rule-masquerade_ssh_gitlab').with( |
66 | 75 |
:target => 'nftables-ip-nat-chain-POSTROUTING', |
67 | 76 |
:content => /^ ip saddr 192\.0\.2\.0\/24 ip daddr 198.51.100.2 tcp dport 22 masquerade$/, |
Formats disponibles : Unified diff