Home » Uncategorized » go on x86_64-linux-musl

go on x86_64-linux-musl

downloaded go1.1,

cd go/src

vi make.bash

remove “-Werror”

vi cmd/dist/unix.c

– bwritestr(&b, “/var/tmp”);

+ bwritestr(&b, “/tmp”);

vi cmd/dist/build.c

//”-Werror”,

vi libmach/linux.c

– #include <sys/signal.h>

+ #include <signal.h>

iptables

– #if defined(__GLIBC__) && __GLIBC__ ==2

+ #if 1

– #include <sys/errno.h>

+#include <errno.h>

vi include/linux/netfilter/xt_osf.h

+ #include <linux/tcp.h>

vi include/linux/netfilter_ipv4/ip_tables.h

+ #include <sys/types.h>

https://www.linuxquestions.org/questions/linux-networking-3/iptables-v1-3-8-cant-initialize-iptables-table-%60filter-577212/

cat /etc/rc
#!/bin/sh
mount -t proc proc /proc
mount -o remount,rw /
mount -t sysfs sysfs /sys
mount -t devpts devpts /dev/pts
echo /bin/mdev > /proc/sys/kernel/hotplug
hostname $(cat /etc/hostname)
# network setup
ifconfig lo 127.0.0.1
ifconfig eth0 192.168.127.100
ifconfig eth0 netmask 255.255.255.0
ifconfig eth0 broadcast 192.168.127.255
ifconfig eth0 down
ifconfig eth0 up
route add default gw 192.168.127.1
/sbin/iptables -P INPUT DROP
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A INPUT -p tcp -i eth0 -j REJECT --reject-with tcp-reset
/sbin/iptables -A INPUT -p udp -i eth0 -j REJECT --reject-with icmp-port-unreachable 
/sbin/iptables -P FORWARD DROP

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s