Could not ping 8.8.8.8 nameserver from android behind NAT

Linux OS Topics
Post Reply
User avatar
SemiconductorCat
Major
Major
Posts: 455
Joined: Mon Aug 22, 2011 8:42 pm
Location: currently in hyperspace

Could not ping 8.8.8.8 nameserver from android behind NAT

Post by SemiconductorCat » Tue May 07, 2013 2:30 am

Hi all, I'm using bellow network configuration to connect to get internet connection established to my android x86 computer.

dialog broadband dongle<====> acer 4741 laptop running Ubunthu <====> Destkop computer Foxconn G31

I have set the iptables in my ubunthu machine but it still didn't seems to be working.

on acer laptop I got /dev/ppp0 as my broadband internet connection and , /dev/eth0 going to the desktop computer.
I've setup 192.168.137.1 for acer laptop eth0 and 192.168.137.2 for my Android Desktop computer.
I could ping from android machine to laptop and laptop to android machine too. But I could not ping to
8.8.8.8 nameserver on the internet.

Code: Select all

root@sandun-Aspire-4741:/home/sandun# iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to-source 192.168.137.2

Do I have to restart iptables to tables to be loaded into kernel memory? I could not find a 'service iptables restart' like
service in ubunthu here. Any idea how to overcome this?
User avatar
SemiconductorCat
Major
Major
Posts: 455
Joined: Mon Aug 22, 2011 8:42 pm
Location: currently in hyperspace

Re: Could not ping 8.8.8.8 nameserver from android behind NAT

Post by SemiconductorCat » Fri Jun 07, 2013 10:59 am

I am an stupid idiot , I close this question.
It's not possible to understand what's wrong without understanding the iptables basics.
Simply I could not memorize the commands. Have to go to the man page and dig them up to
it's clear. That's the only method of making this work.

Anyway I have learned the lesson.There is no ppp0 interface at all. What a lazy stupid question that
I have emitted? Sorry about it.

And for somebody who digging the answer for this, I've written a case study:
https://robot.lk/viewtopic.php?f=20&t=3967
Post Reply

Return to “Linux”