go言語でmips用にコンパイルしたバイナリでエラーがでます
golangで以下のようなコードを書いて、
package main
import "fmt"
func main() {
    fmt.Println("hello")
}
debian上で
export GOOS=linux
export GOARCH=mipsle
export GOMIPS=softfloat
go build -a hello.go
としてできたバイナリを手持ちのルータで実行することができました。
HTTPのgetがしたかったので以下のようなコードを書いて
package main
import (
    "fmt"
    "io/ioutil"
    "log"
    "net/http"
)
func main() {
    fmt.Println("hello")
    url := "http://example.com/"
    resp, err := http.Get(url)
    if err != nil {
        log.Fatal(err)
    }
    defer resp.Body.Close()
    byteArray, _ := ioutil.ReadAll(resp.Body)
    fmt.Println(string(byteArray))
}
同様にbuildしてルータ上で実行したところ以下のエラーがでました。
hello
2018/03/16 05:07:25 Get http://example.com/: dial tcp: lookup example.com on 
202.215.242.209:53: dial udp 202.215.242.209:53: errno -89
多少ググったのですが、エラーの原因がさっぱり分からないので、ご存知のかた教えてください。
追記1:DNSに8.8.8.8設定すると以下のようにエラーメッセージが変わりました。
hello
2018/03/16 06:51:01 Get http://example.com/: dial tcp: lookup example.com on 
8.8.8.8:53: dial udp 8.8.8.8:53: errno -89
追記2:ルーター上でiptable -Lを実行してみました。結果の見方が分かりませんが。
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
malicious_input_filter  all  --  anywhere             anywhere
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
web_filter  all  --  anywhere             anywhere
macipport_filter  all  --  anywhere             anywhere
malicious_filter  all  --  anywhere             anywhere
TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Chain macipport_filter (1 references)
target     prot opt source               destination
Chain malicious_filter (1 references)
target     prot opt source               destination
synflood_filter  tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN
Chain malicious_input_filter (1 references)
target     prot opt source               destination
synflood_input_filter  tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN
DROP       tcp  --  anywhere             anywhere            tcp dpt:80
DROP       tcp  --  anywhere             anywhere            tcp dpt:443
DROP       icmp --  anywhere             anywhere            icmp echo-request
DROP       tcp  --  anywhere             anywhere            tcp dpt:53
DROP       udp  --  anywhere             anywhere            udp dpt:53
Chain synflood_filter (1 references)
target     prot opt source               destination
Chain synflood_input_filter (1 references)
target     prot opt source               destination
Chain web_filter (1 references)
target     prot opt source               destination
追記3:iptable -flushしてみましたが、serviceコマンドが使えなくて再起動できないのですが
iptables -Lの結果は以下のようになりました。
# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Chain macipport_filter (0 references)
target     prot opt source               destination
Chain malicious_filter (0 references)
target     prot opt source               destination
Chain malicious_input_filter (0 references)
target     prot opt source               destination
Chain synflood_filter (0 references)
target     prot opt source               destination
Chain synflood_input_filter (0 references)
target     prot opt source               destination
Chain web_filter (0 references)
target     prot opt source               destination
しかしプログラムの実行結果は変わりませんでした。
hello
2018/03/16 06:51:01 Get http://example.com/: dial tcp: lookup example.com on 
8.8.8.8:53: dial udp 8.8.8.8:53: errno -89