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
530 n0 wg setconf wg0 <(printf '%s\n' "${config[@]}")
532 for ip in $(n0 wg show wg0 allowed-ips); do
545 n0 wg setconf wg0 <(printf '%s\n' "${config[@]}")
554 done < <(n0 wg show wg0 allowed-ips)
563 n0 wg setconf wg0 <(printf '%s\n' "${config[@]}")
564 n0 wg showconf wg0 > /dev/null
576 n0 wg set wg0 peer "$pub1"
577 n0 wg set wg0 peer "$pub2" allowed-ips "$allowedips"
588 } < <(n0 wg show wg0 allowed-ips)
591 ! n0 wg show doesnotexist || false
594 n0 wg set wg0 private-key <(echo "$key1") peer "$pub2" preshared-key <(echo "$psk")
595 [[ $(n0 wg show wg0 private-key) == "$key1" ]]
596 [[ $(n0 wg show wg0 preshared-keys) == "$pub2 $psk" ]]
597 n0 wg set wg0 private-key /dev/null peer "$pub2" preshared-key /dev/null
598 [[ $(n0 wg show wg0 private-key) == "(none)" ]]
599 [[ $(n0 wg show wg0 preshared-keys) == "$pub2 (none)" ]]
600 n0 wg set wg0 peer "$pub2"
601 n0 wg set wg0 private-key <(echo "$key2")
602 [[ $(n0 wg show wg0 public-key) == "$pub2" ]]
603 [[ -z $(n0 wg show wg0 peers) ]]
604 n0 wg set wg0 peer "$pub2"
605 [[ -z $(n0 wg show wg0 peers) ]]
606 n0 wg set wg0 private-key <(echo "$key1")
607 n0 wg set wg0 peer "$pub2"
608 [[ $(n0 wg show wg0 peers) == "$pub2" ]]
609 n0 wg set wg0 private-key <(echo "/${key1:1}")
610 [[ $(n0 wg show wg0 private-key) == "+${key1:1}" ]]
611 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/…
612 n0 wg set wg0 peer "$pub2" allowed-ips 0.0.0.0/0
613 n0 wg set wg0 peer "$pub2" allowed-ips ::/0,1700::/111,5000::/4,e000::/37,9000::/75
614 n0 wg set wg0 peer "$pub2" allowed-ips ::/0
615 n0 wg set wg0 peer "$pub2" remove
617 n0 wg set wg0 peer "$low_order_point" persistent-keepalive 1 endpoint 127.0.0.1:1111
619 [[ -n $(n0 wg show wg0 peers) ]]
620 exec 4< <(n0 ncat -l -u -p 1111)