I have IPv4 and ipv6 addresses on my network card, when I send a request with curl I want only the respective IPv4 or IPv6 to be used and no fallback e.g. When IPv6 to IPv4 takes place.
curl --interface XXXX: c020: XXXX: e601: XXXX: 596c: XXXX: db97 http://ip4only.me/api/
curl: (45) bind failed with error 22: Invalid argument
curl -x http: // [2603: XXXX: 8003: e601: XXXX: 596c: XXXX: db97]: 8080 http://ip4only.me/api/
IPv4,130.XX.XXX.81
I would like to receive an error if the site only accepts IPv4 addresses, as with the --interface variant.
IPv4 forwarding is switched off.
ubuntu @ app-1: ~ $ sudo grep -r ip_forward / etc
/etc/ufw/sysctl.conf:#net/ipv4/ip_forward=1
/etc/sysctl.conf:#net.ipv4.ip_forward=1
Apparently, a forwarding takes place anyway when I send it with a port.