View previous topic :: View next topic |
Author |
Message |
mdoering n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 10 Feb 2003 Posts: 4
|
Posted: Fri May 21, 2004 5:27 pm Post subject: From Zaurus to the net... |
|
|
A few days ago I bought a Sharp Zaurus, flashed the OpenZaurus 3.2 ROM to it and managed to connect it to the net via maskerading. I used this script I did find here in the forums somewhere:
Code: |
#! /bin/bash
localIface=ippp0
localIp=213.7.81.30
zIface=usb0
zIfaceIP=192.168.129.200
zIP=192.168.129.201
typeset -i num
num=`ifconfig | grep $zIface | wc -l`
if [ $num -eq 0 ] ; then
ifconfig $zIface $zIfaceIP netmask 255.255.255.0 up
route add -host $zIP $zIface
fi
iptables -t nat -F
iptables -t nat -A POSTROUTING -j SNAT -o $localIface --to $localIp
echo 1 > /proc/sys/net/ipv4/ip_forward
|
Well, now I just have two problems left: How can I find out my own dynamic ip-address (ippp0) in a scriptable form? Is there something under /proc I could use? And the other thing I have to find out is how I do get the DNS working at OpenZaurus. Should I better just insert some public nameserver or should I forward the one I got from my provider via DHCP or something like this? Do you have any ideas or hints?
Thanks in advance! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
golloza Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 14 Mar 2004 Posts: 427
|
Posted: Fri May 21, 2004 5:52 pm Post subject: |
|
|
I would use something like:
Code: | ifconfig <INTERFACE> | grep 'inet addr' | awk -F : '{ print $2 }' | awk '{ print $1 }' |
to obtain the IP.
In general, you should use your ISP's nameservers. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nihon-jin n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 08 Jan 2004 Posts: 46 Location: Rennes {France}
|
Posted: Fri May 21, 2004 9:45 pm Post subject: Re: From Zaurus to the net... |
|
|
mdoering wrote: | And the other thing I have to find out is how I do get the DNS working at OpenZaurus. Should I better just insert some public nameserver or should I forward the one I got from my provider via DHCP or something like this? |
if your NAT works, you can access your ISP's DNS without any problem. Just set it up in your zaurus (I don't know if OpenZaurus has one, since I'm using dual boot between Sharp original rom (menu dns) and pdaXrom (same thing). In the worst case, you can edit /etc/resolv.conf manually (or /opt/etc/resolv.conf ... dunno what partitions OpenZaurus uses ) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mdoering n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 10 Feb 2003 Posts: 4
|
Posted: Sat May 22, 2004 8:20 am Post subject: |
|
|
The problem is, that I don't know my DNS, because it is dynamic. So I just have two choices: Reach it through in some way, or use another DNS, not the one from my ISP.
I tried to put in some other DNS, but had no success to resolve the hostnames I wanted to resolve (openzaurus.org). Maybe I just need to find the right public DNS. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mdoering n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 10 Feb 2003 Posts: 4
|
Posted: Sat May 22, 2004 8:23 am Post subject: |
|
|
Thanks for the awk-line. It works well. I shurely did know, that ifconfig does provide the information. I just hoped, that there would be another more direct method to get this information, as by text-scanning. But maybe this is the unix way... ![Confused :?](images/smiles/icon_confused.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
don quixada l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/19444306213f8744da0ed3f.jpg)
Joined: 15 May 2003 Posts: 810
|
Posted: Mon Dec 13, 2004 5:19 pm Post subject: |
|
|
mdoering wrote: | The problem is, that I don't know my DNS, because it is dynamic. So I just have two choices: Reach it through in some way, or use another DNS, not the one from my ISP. :? |
I'm running into this problem as well (I think). Does anyone know how to share a dynamic dns with a client machine?
Thanks.
dq |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|