Howto: Ubuntu dapper + internet connection sharing


Recommended Posts

This thread is slightly different to the last as it describes how to enable internet connection sharing over an ad-hoc network, as opposed to just connecting to an Ad-Hoc network with a static IP, I decided to put it into a seperate thread as it relates to configuring a seperate card and I didn't want the other thread getting too busy

My network is set up as so:

ADSL Router -> ethernet -> Dapper PC -> wireless -> Dapper Laptop

Here are the instructions on how to set up the Dapper PC to share the internet to lan clients:

Under the x86_64 Dapper beta 2, the network configuration program crashes, so I installed the i386 version of Dapper beta 2 and now it works.

My ethernet card, connected to the router, was already configured by DHCP, so all I had to do was set up the PCs ra0 card with a static IP address

This wasn't as simple as I thought, we can set it up with ubuntus network configuration manager and it will save the settings correctly to /etc/network/interfaces but it will not set it up as an Ad-Hoc network, to do this you must issue iwconfig ra0 mode Ad-Hoc

iwconfig ra0 essid Z3r0 #your essid here

My PC could now ping the laptop, the laptop could now ping the PC, but the laptop couldn't reach the internet through the PC, this requires another step

modprobe iptable_nat

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

The laptop can now access the internet

Finally add these commands to rc.local to execute on each bootup

iwconfig ra0 mode Ad-Hoc

iwconfig ra0 essid Z3r0 #your essid here

modprobe iptable_nat

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

Troubleshooting:

if you have wireless-mode Ad-Hoc in /etc/network/interfaces your PC will freeze the PC after logging in, do not put it in there, issuing post-up wireless-mode Ad-Hoc doesn't work and pre-up will cause the system not to boot

It is therefore necessary to add the command to rc.local as above.

I had a look at WEP, issuing iwconfig ra0 key s:1234567891011 works but the laptop and PC fail to communicate, I already know it works as the laptop was working with windows before with WEP, so I assume that the drivers are broken? or there is another unknown to me configuration option

--------------------------------------------------------------------------------------------------------------------------------

Just for clarity

/etc/network/interfaces should look like this:

auto lo

iface lo inet loopback

#The primary network interface configured via DHCP

auto eth0

iface eth0 inet dhcp

auto ra0

iface ra0 inet static

address 192.168.0.1

netmask 255.255.255.0

gateway 10.0.0.138 #my router

/etc/resolv.conf should look like this:

nameserver 10.0.0.138 #my router or your ISPs DNS server instead

----------------------------------? ---------------------

If you are connecting directly to a router, try this

set up the ip etc in network manager with dhcp assigned address and WEP off

iwconfig ra0 mode managed #default

iwconfig essid youressid

iwconfig channel 6 #your channel

dhclient ra0 #get ip address from router, no need to issue ifconfig ra0 up/down, I suggest trying a static IP first though

ping 10.0.0.138 #your router

If that works add the iwconfig commands to /etc/rc.local to execute on bootup

Here are two wikis (with info about WPA/WPA2)

One for the AR5212

http://forums.whirlpool.net.au/index.cfm?a=wiki&tag=ar5212

One for the RT61

http://forums.whirlpool.net.au/index.cfm?a=wiki&tag=rt61

Enjoy:))

Edited by Z3r0
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Camtasia 2026.1.3 by Razvan Serea TechSmith Camtasia is the complete professional solution for high-quality screen recording, video editing and sharing. Camtasia 2026 makes editing your videos easier, and faster than ever. The new editor is packed with enhanced video processing, all-new production technology, an innovative library, and stock videos and other creative assets to help you create more polished, professional videos. No video experience needed. Anyone can create informative, engaging videos. Create professional, eye-catching videos: Add special video effects - Apply Behaviors that are perfectly designed to animate your text, images, or icons. Get a crisp, polished look without being a professional video editor. Drag-and-drop your edits - What you see is what you get. Every effect and element in your video can be dropped and edited directly in the preview window. And you can edit at resolutions up to beautiful 4K, for clear video at any size. Get exceptional performance - Camtasia takes full advantage of your computer’s processor with 64-bit performance. You’ll get fast rendering times and enhanced stability—even on your most complex projects. Camtasia 2026.1.3 changelog: Feature Updates Improved keyboard navigability in tool panels. Improved screen reader accessibility of headings in Preferences. Tool panels can now be resized using a keyboard-navigable control. Updated color of folder icon in User Library tab for better visibility. Grouped media now render a composite waveform considering all audio media within that group. Added Long Path Aware to the manifest of Editor and Recorder. Performance Improvements Improved performance for editing groups on the timeline. Improved the project loading performance when timeline has lots of trec media with cursor data. Updates for IT Administrators Updated cpp-httplib from 0.38.0 to 0.43.3. Updated expat from 2.7.4 to 2.8.0. Updated freetype from 2.13.3 to 2.14.3. Updated harfbuzz from 13.0.1 to 14.2.0. Updated libpng16 from 1.6.55 to 1.6.58. Updated pango from 1.57.0 to 1.57.1. Updated girepository from 2.86.3 to 2.88.0. Updated pcre2-posix from 10.47.0 to 12.0.2. Added new harfbuzz-gpu.dll. Updated FFmpeg from 7.1.1 to 7.1.2. Updated aom from 3.11.0 to 3.13.1. Updated dav1d from 1.5.0 to 1.5.1. Updated ogg from 1.3.5 to 1.3.6. Updated SDL2 from 2.32.4 to 2.32.10. Updated zlib from 1.3.1 to 1.3.2. Updated Nalpeiron binaries to version 4.4.69.3. Bug Fixes Fixed an issue which prevented some user submitted crash reports from being sent. Fixed a potential memory leak when decoding HEVC or VP9 video. Fixed a potential crash when trying to delete a range selection on a magnetic track. Fixed a bug with the Properties Panel showing stale properties when only a caption is selected on the timeline. Fixed an issue that could prevent the Opacity and Blur properties from being changed in the Background Removal effect. Fixed an issue where larger Camtasia online projects may fail to open in Camtasia Editor. Table of contents thumbnails are no longer created for Smart Player exports with no table of contents. Fix resetting skew revert to revert just skew and not scale as well. Fixed editing in Snagit with snagX file with Unicode characters. Fixed a bug where grouped visual media could be cropped in some cases. Fixed importing SnagX files with Unicode characters. Localization fixes. Download: Camtasia 2026.1.3 | 309.0 MB (Shareware) View: Camtasia Homepage | Tutorials | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • yeah it seems to be Edge only. The dialog buttons work as expected in Chrome and Firefox. The phone is using Android 16 (OneUI 8.5) and Edge version  149.0.4022.53
    • I'm not aware of this issue, but to help the other guys.  What version of Android are you using? Did you try a different browser? To see if Edge is the issue here.
    • I agree when are you going to read this (really poor BTW) article? Here is a better article so you actually know what is going on and answers questions you had in other comments --> https://arstechnica.com/gadgets/2026/05/speed-boosting-low-latency-profile-is-one-of-the-improvements-coming-to-windows-11/ It is unclear if one will be able to disable the new profile at this point but I am not seeing any reason why one would.
  • Recent Achievements

    • One Month Later
      Jamswaz earned a badge
      One Month Later
    • Week One Done
      Jamswaz earned a badge
      Week One Done
    • Rookie
      Marzoid went up a rank
      Rookie
    • Community Regular
      coch went up a rank
      Community Regular
    • One Year In
      slackerzz earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      510
    2. 2
      PsYcHoKiLLa
      188
    3. 3
      +Edouard
      156
    4. 4
      Steven P.
      83
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!