Lines Matching refs:n0
37 n0() { pretty 0 "$*"; maybe_exec ip netns exec $netns0 "$@"; } function
199 n0 iptables -A INPUT -m length --length 1360 -j DROP
205 n0 iptables -F INPUT
275 n0 ping -W 1 -c 1 192.168.241.2
279 read _ _ tx_bytes_before < <(n0 wg show wg1 transfer)
280 ! n0 ping -W 1 -c 10 -f 192.168.241.2 || false
282 read _ _ tx_bytes_after < <(n0 wg show wg1 transfer)
334 n0 bash -c 'printf 1 > /proc/sys/net/ipv4/ip_forward'
335 n0 bash -c 'printf 2 > /proc/sys/net/netfilter/nf_conntrack_udp_timeout'
336 n0 bash -c 'printf 2 > /proc/sys/net/netfilter/nf_conntrack_udp_timeout_stream'
337 n0 iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -d 10.0.0.0/24 -j SNAT --to 10.0.0.1
389 n0 iptables -t filter -A INPUT \! -s 10.0.0.0/24 -i vethrs -j DROP # Manual rpfilter just to be exp…
393 [[ $(! n0 ping -W 1 -c 1 192.168.241.1 || false) == *"From 10.0.0.100 icmp_seq=1 Destination Host U…
395 n0 iptables -t nat -F
396 n0 iptables -t filter -F
552 n0 wg setconf wg0 <(printf '%s\n' "${config[@]}")
554 for ip in $(n0 wg show wg0 allowed-ips); do
567 n0 wg setconf wg0 <(printf '%s\n' "${config[@]}")
576 done < <(n0 wg show wg0 allowed-ips)
585 n0 wg setconf wg0 <(printf '%s\n' "${config[@]}")
586 n0 wg showconf wg0 > /dev/null
598 n0 wg set wg0 peer "$pub1"
599 n0 wg set wg0 peer "$pub2" allowed-ips "$allowedips"
610 } < <(n0 wg show wg0 allowed-ips)
613 ! n0 wg show doesnotexist || false
616 n0 wg set wg0 private-key <(echo "$key1") peer "$pub2" preshared-key <(echo "$psk")
617 [[ $(n0 wg show wg0 private-key) == "$key1" ]]
618 [[ $(n0 wg show wg0 preshared-keys) == "$pub2 $psk" ]]
619 n0 wg set wg0 private-key /dev/null peer "$pub2" preshared-key /dev/null
620 [[ $(n0 wg show wg0 private-key) == "(none)" ]]
621 [[ $(n0 wg show wg0 preshared-keys) == "$pub2 (none)" ]]
622 n0 wg set wg0 peer "$pub2"
623 n0 wg set wg0 private-key <(echo "$key2")
624 [[ $(n0 wg show wg0 public-key) == "$pub2" ]]
625 [[ -z $(n0 wg show wg0 peers) ]]
626 n0 wg set wg0 peer "$pub2"
627 [[ -z $(n0 wg show wg0 peers) ]]
628 n0 wg set wg0 private-key <(echo "$key1")
629 n0 wg set wg0 peer "$pub2"
630 [[ $(n0 wg show wg0 peers) == "$pub2" ]]
631 n0 wg set wg0 private-key <(echo "/${key1:1}")
632 [[ $(n0 wg show wg0 private-key) == "+${key1:1}" ]]
633 n0 wg set wg0 peer "$pub2" allowed-ips 0.0.0.0/0,10.0.0.0/8,100.0.0.0/10,172.16.0.0/12,192.168.0.0/…
634 n0 wg set wg0 peer "$pub2" allowed-ips 0.0.0.0/0
635 n0 wg set wg0 peer "$pub2" allowed-ips ::/0,1700::/111,5000::/4,e000::/37,9000::/75
636 n0 wg set wg0 peer "$pub2" allowed-ips ::/0
637 n0 wg set wg0 peer "$pub2" remove
639 n0 wg set wg0 peer "$low_order_point" persistent-keepalive 1 endpoint 127.0.0.1:1111
641 [[ -n $(n0 wg show wg0 peers) ]]
642 exec 4< <(n0 ncat -l -u -p 1111)