Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
From Zaurus to the net...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mdoering
n00b
n00b


Joined: 10 Feb 2003
Posts: 4

PostPosted: Fri May 21, 2004 5:27 pm    Post subject: From Zaurus to the net... Reply with quote

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
View user's profile Send private message
golloza
Guru
Guru


Joined: 14 Mar 2004
Posts: 427

PostPosted: Fri May 21, 2004 5:52 pm    Post subject: Reply with quote

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
View user's profile Send private message
nihon-jin
n00b
n00b


Joined: 08 Jan 2004
Posts: 46
Location: Rennes {France}

PostPosted: Fri May 21, 2004 9:45 pm    Post subject: Re: From Zaurus to the net... Reply with quote

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 :roll: )
Back to top
View user's profile Send private message
mdoering
n00b
n00b


Joined: 10 Feb 2003
Posts: 4

PostPosted: Sat May 22, 2004 8:20 am    Post subject: Reply with quote

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
View user's profile Send private message
mdoering
n00b
n00b


Joined: 10 Feb 2003
Posts: 4

PostPosted: Sat May 22, 2004 8:23 am    Post subject: Reply with quote

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... :?
Back to top
View user's profile Send private message
don quixada
l33t
l33t


Joined: 15 May 2003
Posts: 810

PostPosted: Mon Dec 13, 2004 5:19 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum