Page 5 of 5 FirstFirst 12345
Results 41 to 42 of 42
Discuss [Project] iPhone as a 3G router at the Free Toolchain Software (Cydia App's) -; Originally Posted by aviegas Long ago, just after the first unlock for the 2G was ...
  1. #41
    Newbie Array

    Join Date
    Jul 2009
    Post Thanks / Like
    Rep Power


    Quote Originally Posted by aviegas View Post
    Long ago, just after the first unlock for the 2G was released this was my first project.

    The problem is not getting DHCP or Bonjour to work (you do not need bonjour at all).

    The iPhone will connect to the "celular data network" (3G, EDGE or GPRS) and get an IP address, normally an IP with Internet connectivity (outside of the private range).

    The WLAN interface will be able to assign private addresses. It's ok and doable.

    But you need to be able to "route" the packages with NAT, that is not only forward packages from one interface to the other, but change the package headers to allow sharing the single valid IP.

    iPhoneOS is nothing more than a crippled version of MacOS, so the same structure is there. But the necessary kernel extensions are missing.

    First, you need "ipfw" to control NAT routing parameters in the kernel. although we can compiled the user level command, it's impossible to add IP_FW support to kernel (or non trivial). Here is the results we got last year:

    # ifconfig
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
            inet netmask 0xff000000 
            inet netmask 0xffffff00 broadcast
            ether 00:1c:b3:09:8b:84 
    ip1: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1450
            inet --> netmask 0xffffffff 
    ip2: flags=8011<UP,POINTOPOINT,MULTICAST> mtu 1500
    # sysctl -w net.inet.ip.forwarding=1
    net.inet.ip.forwarding: 0 -> 1
    # natd -interface ip1
    # ipfw -f flush
    ipfw: setsockopt(IP_FW_FLUSH): Protocol not available
    # ipfw add divert natd all from any to any via ip1 
    ipfw: getsockopt(IP_FW_ADD): Protocol not available
    So, unless we find the proper kernel sources to replace the kernel on the phone, we are stuck. I may be wrong and I would love to see someone proving me wrong.
    Hello everyone,
    After a lot of frustrating investigations I found that the command we should use to control kernel packet filtering is not ipfw. The commad to use is pfctl which interacts with /dev/pf device via ioctl. Infact looking into misd executable used by the iphone to enable packet filtering I finally found the interaction with /dev/pf device. The porting of this utility is not done but the source by openbsd con be found here: src/sbin/pfctl/. I have no mac nor xcode development environment nor gcc (porting of gcc is still in development) under iphone 3.0 to try porting. Anyone interested ?

  2. #42
    iZh is offline
    Newbie Array

    Join Date
    Aug 2010
    Post Thanks / Like
    Rep Power


    is this app the solution to your project???

    MyWi 4.0


Page 5 of 5 FirstFirst 12345

Similar Threads

  1. MacNN: TP-Link intros 802.11n pocket router, portable 3G router
    By hackint0sh in forum Latest Headlines
    Replies: 0
    Last Post: 11-17-2011, 04:20 AM
  2. Replies: 0
    Last Post: 07-29-2010, 05:20 AM
  3. iphone 3g as wifi router?
    By bigfish2 in forum Free Toolchain Software (Cydia App's)
    Replies: 2
    Last Post: 06-21-2009, 10:18 PM
  4. iPhone Router/Gateway/NAT - possible?
    By leshric in forum General
    Replies: 0
    Last Post: 07-25-2008, 04:35 PM
  5. [Req] Using the iPhone as a wireless router?
    By geuis dassin in forum Free Toolchain Software (Cydia App's)
    Replies: 2
    Last Post: 03-08-2008, 05:18 AM

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012
All times are GMT +2. The time now is 11:12 PM.
twitter, follow us!