Lines Matching refs:to
42 # Restrict source port to just one so we don't have to exhaust
47 ip netns exec "$ns2" iptables -t nat -A OUTPUT -d 10.96.0.1/32 -p tcp --dport 443 -j DNAT --to-destination 192.168.1.1:5201
49 # ... and route it to the other namespace
57 # ip daddr:dport will be rewritten to 192.168.1.1 5201
63 # Check socat can connect to 10.96.0.1:443 (aka 192.168.1.1:5201).
71 ip netns exec "$ns1" iptables -t nat -A PREROUTING -p tcp --dport 5202 -j REDIRECT --to-ports 5201
72 ip netns exec "$ns1" iptables -t nat -A PREROUTING -p tcp --dport 5203 -j REDIRECT --to-ports 5201
76 # if connect succeeds, client closes instantly due to EOF on stdin.
87 # 'cpid2' to connect and then exit (and no connect delay).
91 echo "PASS: could connect to service via redirected ports"
93 echo "FAIL: socat cannot connect to service via redirect ($delta seconds elapsed, returned $rv)"