Skip to content

Instantly share code, notes, and snippets.

@Cameron-D
Created December 1, 2013 02:01
Show Gist options
  • Select an option

  • Save Cameron-D/7727681 to your computer and use it in GitHub Desktop.

Select an option

Save Cameron-D/7727681 to your computer and use it in GitHub Desktop.
#!/usr/bin/expect
set timeout 20
set user "admin"
set password ""
spawn telnet 192.168.1.254
expect "Login: "
send "$user\n"
expect "Password: "
send "$password\n"
sleep 1
send "echo 65535 > /proc/sys/net/netfilter/nf_conntrack_max\n"
sleep 10
send "echo 512 > /proc/sys/net/netfilter/nf_conntrack_expect_max\n"
sleep 10
send "exit\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment