Tuesday, April 30, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 679  / 2 Years ago, sat, march 12, 2022, 10:15:26

I currently use net.ipv6.conf.all.use_tempaddr=2 to get IPv6 privacy addresses (which have a random host part are and regenerated a couple times a day). I need dynamic DNS because the computer is connected to different networks and that changes the network part of the address. I'm using curl to download a dynamic DNS url and want it to use the Non-random address that uses my MAC. How can I make curl prefer the non-privacy address?


More From » ipv6

 Answers
2

I used ajmitch's answer and some scripting to do this. (If anyone has a better way of getting the address, I would be glad to hear it.) You'll need to install curl



#! /bin/sh
# (C) 2011 Erik B. Andersen <[email protected]>
# Licensed under the latest version of the GPL as published by the Free Software Foundation

# Don't bother to reload when lo is configured.
if [ "$IFACE" = lo ]; then
echo "Interface lo; skipping"
exit 0
fi

if [ ! -e /usr/bin/curl ]; then
echo "Curl not installed; skipping"
exit 0
fi
if [ ! -e /sbin/ifconfig ]; then
echo "Ifconfig not installed; skipping"
exit 0
fi
if [ ! -e /bin/grep ]; then
echo "Grep not installed; skipping"
exit 0
fi
if [ ! -e /usr/bin/tr ]; then
echo "Tr not installed; skipping"
exit 0
fi
if [ ! -e /usr/bin/tail ]; then
echo "Tail not installed; skipping"
exit 0
fi

Hostname="something.example.org"
Password="something"
Interface="wlan0"

echo "Running curl"
curl --interface $(/sbin/ifconfig ${Interface} | /bin/grep "Global" | /usr/bin/tr "/" "
" | /usr/bin/tr " " "
" | /bin/grep "ff:fe"| /usr/bin/tail -n 1) -6 http://${Hostname}:${Password}@dyn.dns.he.net/nic/update?hostname=${Hostname}

exit 0

[#44626] Saturday, March 12, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bewre

Total Points: 164
Total Questions: 108
Total Answers: 106

Location: Ghana
Member since Sun, Mar 27, 2022
2 Years ago
;