Lines Matching defs:n2

39 n2() { pretty 2 "$*"; maybe_exec ip netns exec $netns2 "$@"; }
106 n2 wg set wg0 \
120 n2 ping -c 10 -f -W 1 192.168.241.1
124 n2 ping6 -c 10 -f -W 1 fd00::1
128 n2 iperf3 -s -1 -B 192.168.241.2 &
135 n2 iperf3 -Z -t 3 -c fd00::1
140 n2 iperf3 -Z -t 3 -b 0 -u -c 192.168.241.1
143 n2 iperf3 -s -1 -B fd00::2 &
150 n2 iperf3 -p $(( 5200 + i )) -s -1 -B 192.168.241.2 &
164 n2 wg set wg0 peer "$pub1" endpoint 127.0.0.1:1
166 n2 ping -c 10 -f -W 1 192.168.241.1
171 read _ rx_bytes tx_bytes < <(n2 wg show wg0 transfer)
188 n2 wg set wg0 peer "$pub1" endpoint [::1]:1
198 n2 wg set wg0 peer "$pub1" endpoint 127.0.0.1:1
201 n2 ip route add 192.168.241.1/32 dev wg0 mtu 1299
202 n2 ping -c 1 -W 1 -s 1269 192.168.241.1
203 n2 ip route delete 192.168.241.1/32 dev wg0 mtu 1299
216 [[ $(n2 wg show wg0 endpoints) == "$pub1 127.212.121.99:9999" ]]
222 [[ $(n2 wg show wg0 endpoints) == "$pub1 [::1]:9998" ]]
229 n2 ncat -u 192.168.241.1 1111 <<<"X"
234 n2 wg set wg0 listen-port 9997
238 n2 ncat -u 192.168.241.1 1111 <<<"X"
246 n2 wg set wg0 private-key <(echo "$key2") listen-port 2 peer "$pub1" preshared-key <(echo "$psk") allowed-ips 192.168.241.1/32
249 n2 wg set wg0 peer "$pub3" preshared-key <(echo "$psk") allowed-ips 192.168.241.1/32 peer "$pub1" remove
251 n2 wg set wg0 peer "$pub3" remove
259 n2 wg set wg0 private-key <(echo "$key2") listen-port 2 peer "$pub1" preshared-key <(echo "$psk") allowed-ips fd00::5:1/128 endpoint 127.212.121.99:9998
269 n2 wg set wg1 listen-port 5 private-key <(echo "$key4") peer "$pub3" allowed-ips 192.168.241.1/32,fd00::1/128 endpoint [fd00::5:1]:5
341 n2 ping -W 1 -c 1 192.168.241.1
342 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.1:1" ]]
343 # Demonstrate n2 can still send packets to n1, since persistent-keepalive will prevent connection tracking entry from expiring (to see entries: `n0 conntrack -L`).
345 n2 ping -W 1 -c 1 192.168.241.1
361 n2 wg set wg1 private-key <(echo "$key3") listen-port 5 peer "$pub1" allowed-ips 192.168.242.1/32
388 n2 iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -d 192.168.241.0/24 -j SNAT --to 192.168.241.2
390 n2 bash -c 'printf 1 > /proc/sys/net/ipv4/ip_forward'
392 n2 wg set wg0 peer "$pub1" remove
397 n2 iptables -t nat -F
421 n2 bash -c 'printf 0 > /proc/sys/net/ipv6/conf/all/accept_dad'
423 n2 bash -c 'printf 0 > /proc/sys/net/ipv6/conf/veth2/accept_dad'
461 n2 wg set wg0 peer "$pub1" endpoint 10.0.0.1:1
462 n2 ping -W 1 -c 1 192.168.241.1
463 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.1:1" ]]
464 n2 wg set wg0 peer "$pub1" endpoint [fd00:aa::1]:1
465 n2 ping -W 1 -c 1 192.168.241.1
466 [[ $(n2 wg show wg0 endpoints) == "$pub1 [fd00:aa::1]:1" ]]
467 n2 wg set wg0 peer "$pub1" endpoint 10.0.0.2:1
468 n2 ping -W 1 -c 1 192.168.241.1
469 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.2:1" ]]
470 n2 wg set wg0 peer "$pub1" endpoint [fd00:aa::2]:1
471 n2 ping -W 1 -c 1 192.168.241.1
472 [[ $(n2 wg show wg0 endpoints) == "$pub1 [fd00:aa::2]:1" ]]
479 n2 wg set wg0 peer "$pub1" endpoint 10.50.0.1:1
480 n2 ping -W 1 -c 1 192.168.241.1
481 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.50.0.1:1" ]]
508 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.1:1" ]]
511 n2 bash -c 'printf 0 > /proc/sys/net/ipv4/conf/veth4/rp_filter'
513 n2 bash -c 'printf 0 > /proc/sys/net/ipv4/conf/all/rp_filter'
515 [[ $(n2 wg show wg0 endpoints) == "$pub1 10.0.0.3:1" ]]
665 n2 wg set wg0 peer "$pub1" endpoint [fd00:aa::1]:1