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

    • "Elon Musk says a kid-friendly 'Baby Grok' is on the way" No kid wants to be a baby anymore. "Kid friendly" I would have named it "Kid Grok"
    • TP-Link Tri-Band AXE5400 Wi-Fi 6E Gaming Router Archer GXE75 is just $135 by Sayan Sen If you’re juggling gaming consoles, 4K streams and a growing roster of smart devices, the TP-Link Archer GXE75 Tri-Band AXE5400 Wi-Fi 6E Gaming Router is a good option to look at right now, considering the device is currently on sale at just $135 (purchase link under the specs table below). The Archer GXE75 promises up to 5.4 Gbps of throughput across three bands: 574 Mbps on 2.4 GHz, 2402 Mbps on 5 GHz and 2402 Mbps on 6 GHz (HE160 channels enabled). A 2.5 Gbps WAN/LAN port pairs with three 1 Gbps LAN ports and a USB 3.0 port for fast file sharing or printer access (purchase link down below). The quad-core CPU and 512 MB of RAM should help to handle multiple streams without bogging down, while MU-MIMO, OFDMA and 1024-QAM improve efficiency when several devices connect simultaneously. The router’s built-in Game Accelerator engine is said to automatically prioritize gaming packets (both wired and wireless), and TP-Link’s GPN (Gamers Private Network) acceleration can reduce packet loss for supported titles. HomeShield security brings firewall protection, device quarantining and parental controls. The technical specifications of the router are given below: Specification Details Wireless Standards IEEE 802.11ax 6 GHz; IEEE 802.11ax/ac/n/a 5 GHz; IEEE 802.11ax/n/g/b 2.4 GHz Wi-Fi Speeds 6 GHz: 2402 Mbps (802.11ax); 5 GHz: 2402 Mbps (802.11ax); 2.4 GHz: 574 Mbps (802.11ax) Spatial Streams 6 streams (tri-band OFDMA/MU-MIMO) Processor 1.7 GHz 64-bit Quad-Core CPU Memory 512 MB high-speed RAM Ethernet Ports 1× 2.5 Gbps WAN/LAN; 1× 1 Gbps WAN/LAN; 3× 1 Gbps LAN USB 1× USB 3.0 SuperSpeed port (up to 10× faster than USB 2.0) Antennas 4× high-performance external antennas with Beamforming Buttons Power On/Off; Reset; WPS/Wi-Fi; LED On/Off Working Modes Router Mode; Access Point Mode Security WPA, WPA2, WPA3, WPA/WPA2-Enterprise; SPI firewall; Access Control; IP/MAC binding; Application-layer gateway; HomeShield security suite VPN OpenVPN, PPTP, L2TP (server & client); WireGuard (server & client) Software & Services IPv4/IPv6; TP-Link HomeShield; EasyMesh; Parental controls; QoS by device; WAN types (Dynamic IP, Static IP, PPPoE, PPTP, L2TP); DDNS (TP-Link, NO-IP, DynDNS); auto firmware updates Gaming Features Game QoS boost; gaming-port priority; Gamers Private Network acceleration; game-port forwarding; real-time game panel with stats & RGB control Operating Environment 0 °C – 40 °C; 10 %– 90 % non-condensing humidity Get the TP-Link Tri-Band AXE5400 Wi-Fi 6E Gaming Router Archer GXE75 at the link below: TP-Link Tri-Band AXE5400 Wi-Fi 6E Gaming Router Archer GXE75 | EasyMesh, HomeShield: $159.99 + $25 off with coupon => $134.99 (Sold and Shipped by Amazon US This Amazon deal is US-specific and not available in other regions unless specified. If you don't like it or want to look at more options, check out the Amazon US deals page here. Get Prime (SNAP), Prime Video, Audible Plus or Kindle / Music Unlimited. Free for 30 days. As an Amazon Associate, we earn from qualifying purchases.
    • Oh no... here we go again. Tha same sh*t that happaned to Mail & Calendar...
    • I too have worked with pro gear for decades and so I found the interface to be unintuitive from both the pro and casual side (a rare "accomplishment" by what are obviously otherwise skilled coders, hehe). I eventually got it to work, thanks for offering, but I found other compatibility issues with my own use case, so I just dropped it entirely. Right now, I just use an analog line out/line in approach which works as expected across all usage scenarios. With both machines on the same power block/outlet, I'm not getting any analog hum or hiss. My next step will be to try the updated Multiplicity 4 when a bug, addressing this very issue unfortunately, is resolved. Knowing Stardock, that could be tomorrow or five years from now, so I check back every few months to see it it's fixed and I want to upgrade. Again, thanks for offering to help.
  • Recent Achievements

    • Rookie
      Snake Doc went up a rank
      Rookie
    • First Post
      nobody9 earned a badge
      First Post
    • One Month Later
      Ricky Chan earned a badge
      One Month Later
    • First Post
      leoniDAM earned a badge
      First Post
    • Reacting Well
      Ian_ earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      495
    2. 2
      Michael Scrip
      203
    3. 3
      ATLien_0
      197
    4. 4
      Xenon
      137
    5. 5
      +FloatingFatMan
      116
  • Tell a friend

    Love Neowin? Tell a friend!