Ping from galileo to computer not working

Hello
I am using a Galileo, and I am able to connect to the board using SSH. So the ping works fine from the computer to the Galileo, but not from the Galileo to the computer. I put both devices on the same network with the same netmask (169.254.1.1/16 for the board, 169.254.1.2/16 for the computer Ethernet interface). My routing table is:

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0

I also tried to add the computer IP address as the default gateway but the ping is still not working.

The issue is that I need to access the Internet from the Galileo to install packages.

Do you have any ideas?

Thanks.

Why are you using ad-hoc IPs (169.254.0.0/16) for your local network? Did you check the firewall configuration of your PC? What OS is that computer running? If the ping in one direction works, the hardware is not the problem, it must be a configuration issue.

pylon beat me to it by a few seconds, so just add my post as an agreement with his.

I’m not a Galileo expert, but I know network stuff. If it works one way, and not the other, then check the firewall on the computer. Insure it is allowing that ip subnet through the firewall.

You might want to use another ip subnet on that interface.

Thank you pylon and SurferTim.
I am using Debian 7 with the default configuration, so I’m not sure there is a firewall on it. Is there a way to check it? Or to allow some IPs?
I also tried on Windows 8 disabling the firewall and the ping Galileo → computer worked.
Are addresses in 10.0.0.0/8 a better choice?

10.0.0.1/24 is better yet.

Most Debian versions have a GUI firewall app. If not, iptables with a terminal console is the way to determine that.

I am using Debian 7 with the default configuration, so I'm not sure there is a firewall on it. Is there a way to check it? Or to allow some IPs?

For a quick check:

iptables -L -n

Post the output of that command if you not sure how to interpret it.

First of all, I tried to change the Galileo IP with 10.0.0.1/24 and my computer on the same network, but the ping from computer to board and SSH didn't work. (The official tutorial advises us to use 169.254.1.1/16).
Even though, here is the output of iptables:

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

It appears there are no firewall rules. That is odd.

Personally, I would use 10.0.0.1/24 on the computer, and 10.0.0.2/24 on the Galileo.

I would also check the ip assignments on other interfaces. Use ifconfig in a terminal console to determine the ip address.

What's between the Galileo and the PC? Just a network cable? A switch? A router?

With 10.0.0.1 and 10.0.0.2 SSH doesn't work anymore...

It's actually odd because when the firewall is disabled on Windows the ping works, so if there is no firewall rules on Debian it should work too.

There is just a cable between the Galileo and the PC. I plan to use a router, but for now I just want to make it work with the PC in router mode.

The ping works in both directions on Debian, but I still cannot access the Internet from the Galileo. I tried to make my PC as a router with the command:

sysctl net.ipv4.ip_forward=1

and I also added a default route on the Galileo to my PC, but it doesn't change anything. Is there a better way to access Internet from the Galileo through the PC?

The ping works in both directions on Debian, but I still cannot access the Internet from the Galileo.

What have you done to make it work?

Post the output of the following command executed on the Galileo and the PC:

ip route show; ip neigh show; ip link show

If you are using another interface on the computer as the WAN interface to the internet, you will probably need to set a masquerade on the WAN interface. Here is a page I found with a Google search.
http://www.ibiblio.org/pub/linux/docs/howto/other-formats/html_single/Masquerading-Simple-HOWTO.html

With NAT I can access Internet from the Galileo!
I ran in root mode:

iptables -t nat -A POSTROUTING -o <external_itf> -j MASQUERADE
iptables -A FORWARD -i <external_itf> -o <internal_itf> -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i <internal_itf> -o wlan0 -j ACCEPT

where <external_itf> is the interface connected to the Internet.

Now I am just searching how to install other packages (I have only the packages from the Yocto project, and I need some other ones), but maybe this is not the right topic.

Thanks for your help!