Auto connect Alliance Broadband


Alliance Broadband a known ISP having web based authentication and sharing IP Connector tool for window users only, made my life difficult. It was mandatory to start X and then a browser to complete the authentication even I wanted to just upgrade the box. And that challenge is nicely handled by Linux itself.

The ISP provides URL to visit and Fiddler chrome extension clearly shows the login & logout form used by the authentication process.

Equivalent curl based Login and Logout are

curl -sS -X POST -d "login=LOGIN&user="${USER}"&pass="${PASSWD}"" "${AuthURL}"
curl  -sS -X POST -d "logout" "${AuthURL}"

As the URL is also working over SSL, curl -k can be used to trust the  certificate. Below is a minimal script witch takes argument 1 to connect and 0 to disconnect with ISP as well as indicate presence/absence of Internet, based on ping check.


if [ $# -eq 0 ] || [ $1 -gt 1 ]
echo "usage $0 1 -> connect ; $0 0 -> disconnect"
exit 1
elif [ $1 -eq 1 ]
curl -ksS -X POST -d "login=LOGIN&user="${USER}"&pass="${PASSWD}"" "${AuthURL}" | grep -i incorrect
elif [ $1 -eq 0 ]
curl -ksS -X POST -d "logout" "${AuthURL}"

ping -c 3 -w 3 > /dev/null 2>&1 && echo "Internet available"  || echo "No Internet"

Thanks to Linux

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s