[Solved] Share internet from Wlan0 to other computers

Is it possible to share internet connection from my laptop which is connected to internet through wlan0 interface (wireless) to other PCs on the LAN with my eth0 interface and lan cable?
(Like,  Internet >> wireless Access-point >> laptop (wlan0) >> bridge to eth0 (lan card on this laptop) >> switch (through wired connection) >> other PCs)
and where can I find how?
Thanks
Last edited by ottoshmidt (2012-04-23 21:26:58)

alex_anthony wrote:
Can also be done with networkmanager if you don't want to get your hands dirty (and if you're using it anyway).
In summary:
Make sure dnsmasq and iptables are installed
Connect nm to wireless
Connect ethernet cable between computers
in nm-connection-editor, edit wired connection
Under ipv4 settings, choose method, shared to other computers
Disclaimer: This was when I was using fedora, but I have a hotspot the other way round on arch so I presume it will work.
https://bbs.archlinux.org/viewtopic.php?id=139653
Actually I did that one first, saw that post, but couldn't succeed and then tried https://wiki.archlinux.org/index.php/Internet_Share and succeeded. So I needed to enable ipv4  forwards and also to install iptables (which should be running as a daemon). Can't judge what was wrong in your steps for sure but at least, as I said arch wiki gives a right direction to go.
Thanks all anyway.
Last edited by ottoshmidt (2012-04-23 21:28:04)

Similar Messages

  • [Solved] Share internet from (laptop) wifi to (RaspberryPi) ethernet

    Hi,
    I've been attempting to share the internet from my laptop wifi connection to a raspberry pi (with arch) connected via an ethernet port.
    For some reason, the Rpi doesn't connect. I've closely followed the instructions at:
    https://wiki.archlinux.org/index.php/Internet_sharing
    Yet the following script doesn't seem to work. The Rpi recognizes the the Ethernet connection but dhcpcd isn't dishing out an IP address. When I plug the Rpi into an ethernet port on my router it connects fine so as far as i'm understanding it should 'just work'.
    #!/bin/bash
    DEVICE="enp0s25"
    ip link set $DEVICE down
    ip link set $DEVICE up
    ip addr add 192.168.123.1/24 dev $DEVICE
    sysctl net.ipv4.ip_forward=1
    iptables -t nat -A POSTROUTING -o internet0 -j MASQUERADE
    iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
    iptables -A FORWARD -i $DEVICE -o internet0 -j ACCEPT
    dhcpcd $DEVICE
    Any tips for getting to the bottom of the issue?
    Tom
    Last edited by anthillsocial (2015-04-08 12:03:14)

    Success!! I'd mistakenly thought that dhcpcd acted as both client and server so that's where I went wrong. The following script now works using dhcpd. As a reference for others, here's my setup:
    #!/bin/bash
    DEVICE="enp0s25"
    ROUTERIP=139.96.30.1 # 192.168.123.1
    ip link set $DEVICE down
    ip link set $DEVICE up
    ip addr add $ROUTERIP/24 dev $DEVICE # arbitrary address
    sysctl net.ipv4.ip_forward=1
    iptables -t nat -A POSTROUTING -o internet0 -j MASQUERADE
    iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
    iptables -A FORWARD -i $DEVICE -o internet0 -j ACCEPT
    #Config file: /etc/dhcpd.conf
    #Database file: /var/lib/dhcp/dhcpd.leases # cat this to see if a device has been asigned a lease
    #PID file: /var/run/dhcpd.pid
    dhcpd $DEVICE
    And /etc/dhcpd.conf contains:
    option domain-name-servers 8.8.8.8, 8.8.4.4;
    option subnet-mask 255.255.255.0;
    option routers 139.96.30.100;
    subnet 139.96.30.0 netmask 255.255.255.0 {
    range 139.96.30.150 139.96.30.250;
    Then to find out the IP address assigned to the Rpi, simply
    cat /var/lib/dhcp/dhcpd.leases
    Thanks for the help

  • My iMac won't stay connected to the internet, even though all other computers in my house stay connected

    My iMac won't stay connected to the internet, even though all other computers in my house stay connected, and its connection is set up the same way my fiance's macbook is (his macbook is about three years older than my iMac). Every time my computer goes into sleep mode and I come back (even if it's mere seconds after giving the black screen) I have no internet connection. I discovered a workaround for it some time ago, but now that is working less and less, and now my computer randomly disconnects WHILE I'm actively using the internet. Just a few minutes ago, the connection refused to come back until I restarted my computer, even though once again all other computers in the house were connected. The workaround I discovered before and which doesn't work as reliably now, is to click opne Airport at the top right of the screen, click "Open Network Preferences," then click "Assist me," then click "Diagnostics," and wait for everything to turn green again, signalling a connection.

    Let's check the quality of your connection since signal strength alone does not insure a good connection. The "bars" that you see at the top of the iMac screen are there pretty much for show.
    Hold down the option key on the iMac while you click on the Apple icon at the upper left corner of your screen and select System Profiler
    Look down the list of items at the left of the window until you find the setting for Network, then click on AirPort.
    In the window to the right, look for any listings of your wireless network name. You may possibly see two listings for the wireless network name.
    We need for you to list the information that you see for Signal / Noise.  These will be negative numbers. Post back with your findings and we will continue.
    In the meantime, please move any cordless phones that you have or any other electronic devices that are near the iMac as far away as possible from the iMac.
    If the iMac is located in a corner or an enclosed area, give it as much room as possible since the wireless antenna is on the back of the iMac and it needs to be able to "see" the room.
    Anything that you can do to minimize the number of obstructions like walls or furniture etc between the iMac and the wireless router will help the cause as well.

  • How to share internet from mac to windows

    Any one helps me how to share internet from mac to windows? I have created an internet sharing on macbook, a Mac can connect to internet, but windows pc can't connect with this sharing. I don't know why?

    I am not a Windows guru. However, in XP there is a Wireless Network icon at the lower right side. Click on that, select the network you want to join, insert the password and that's it. Any issues speak to a Windows guru.

  • How to share internet from macbook pro to android phone?

    how to share internet from macbook pro to android phone?

    Sharing your Internet connection:
    http://support.apple.com/kb/PH6589
    http://www.maclife.com/article/howtos/how_wirelessly_share_internet_connection_m ac

  • I bought a Mountain Lion upgrade for $20 off the Apple site. I have four other Macs all under the same ID. How can I share the new OS with other computers. Or can I?

    I bought a Mountain Lion upgrade for $20 off the Apple site. I have four other Macs all under the same ID. How can I share the new OS with other computers. Or can I?

    You can share it with other Macs under your control (not your neighbor's).  You just need to be logged in under the buying AppleID for updates or to download again.
    Use this thread to find a method of copying the ML download into a USB drive to make other installations easier: https://discussions.apple.com/message/16639520#16639520

  • I installed Mountain Lion on my iMac. Now I cannot access the Internet. All the other computers and tablets have no problem. I did PRAM and MC reset, modem reset, etc., all the usual ju-ju. I also cannot connect on my local network to any other computer.

    I installed Mountain Lion on my iMac. Now I cannot access the Internet. All the other computers and tablets on the network have no problem. I did PRAM and MC reset, modem reset, etc., all the usual ju-ju. I also cannot connect on my local network to any other computer. Yet Network control panel says I am connect to the modem, and Network Diagnosis says I am connected to the Internet. It's like the blind man who has eyes that cannot see. BTW, I am not some newbee. I have been a Machead since the early nineties and set up a half dozen networks, including the one I am using at home to which the iMac mysteriously is there but not. This has me stumped! I am considering going back to 10.7!

    Select  ▹ System Preferences ▹ Network ▹ Advanced ▹ TCP/IP. What values are shown for the following:
    Configure IPv4
    IPv4 Address
    Subnet Mask
    Router

  • How do you transfer files from iPad to other computers?

    How do you transfer app files from iPad to other computers - both PC and Mac?  I am particularly interested in app files for Smart Notebook, Excel, and MS Word.

    You can use Dropbox.
    https://itunes.apple.com/sg/app/dropbox/id327630330?mt=8

  • Can't share Internet from Mac to AirPort Extreme via Thunderbolt Ethernet

    Hey there!
    I'm trying to essentially use a 2013 AirPort Extreme as an AP for the network. It's connected via WAN to a Mac via a Thunderbolt to Ethernet adapter.
    I'm having a hard time telling OS X (10.10)/ OS X Server that I want it to take the Internet from "iPhone USB" and share it with "Thunderbolt Ethernet". With or without OS X Server's DHCP/DNS "help". I've been experiencing issues with Internet Sharing for years on OS X, so the fact that I'm having an issue today is no surprise, I'm just hoping someone out there has a solution.
    If I go back to Internet Sharing in System Preferences, the "share Internet connection from" combo box is blank, rather than showing "iPhone USB".
    Also, I'm unsure as to whether I should be using OS X Server... I know it's not necessary for simple Internet connection sharing, but I'd like to use DHCP and DNS services with this setup at least eventually.... Obviously just getting Internet to the AirPort is first-priority.
    Any ideas?

    Hello Kevin,
    Let me try to get this straight, it seems like you want to bridge the fee-based wifi network and your home wireless network using your MB.
    I don't know if you have done the following steps already on your MB:
    1) Choose Apple > System Preferences, and then click Sharing.
    2) Select Internet Sharing.
    3) Choose a network service from the “Share your connection from” pop-up menu, AirPort in your case.
    4) Select a networking service to share your Internet connection from the “To computers using” list, ethernet in your case.
    Sorry, yes indeed it is straight from Mac Help titled "Sharing your Internet connection." and it sounds like you have done the sharing part already. You wrote about something wrong with your MB. It might be helpful to write what is wrong with your MB, AirPort Extreme, or your "other computers." Preciseness can definably help us help you.
    May you solve the problem.

  • [Solved]Share internet connection

    Hi guys
    I know the title seems kinda dumb but maybe is not as easy as it seems (or im having a brain segmentation fault).
    What i want to do is this, i have a wireless router on the living room and i just bought a PC and put it in my bedroom i alredy had a netbook and i want to have internet connection in my PC i see 3 options:
    1. buy a giant ethernet cable, and pay like 25 euros, or 2 not so big cables a put a switch in the midle and pay even more
    2. buy a wireless card for my PC, pay 15 euros and it will problably not work in linux
    3. connect my netbook to the wireless then connect PC and netbook via ethernet cable (crossover right?) and share internet connection
    I rather option number 3 (in long term i will eventually go with number 2) but i dont know how to do it.
    Alredy tried windows to windows but of course Microshit didnt put Internet Connection Share on windows 7 starter version (the one theat came up with the netbook).
    I only have Windows on the PC yet cause i want internet so i can install arch so option 3 has to be linux-to-Windows(i also want internet on windows, not because i use it that much but you never know), but then when i install arch how i will i get the packges to configure the network without internet.
    Anyway i will problably try to talk to my Network Fundaments Teacher in College next week but i wanted this working this weekend so i could install arch.
    Help me please just bought the tower and i cant do shit with it (no internet no graphics card)
    Sorry for my poor english
    Last edited by archoriano (2011-09-30 09:43:31)

    alphaniner wrote:
    There's an Internet Share topic in the wiki.
    BTW, as is often the case, your English is better than a great many native speakers.
    Well that didnt work, the problem is as soon as i do "ifconfig eth0 up" computer disconnects from wireless so i lose internet conection on laptop... WAIT A MINUTE i just entered the forum to tell you this.
    Turns out it does work, somehow wicd says im not connected to wireless but i am :?
    i dont care its working its all that matters.
    Thanks

  • Can you share playlists on iTunes with other computers?

    I recently started to share my iTunes library across all my home computers. I have my main libray shared and can view all the music entries. Now I wanted to see if I could share playlists already compiled among these computers.

    As of now (Jan 19th, 2006) the is no programs on the PC side that allow you to build an enhanced podcast.
    The closest thing comes from a Web Ap - call Audio Merge.
    http://www.audiomerge.com
    But it only builds an enhanced podcast that is viewable from a web browser.
    Rob @ podcast411.com

  • Share internet from Ethernet port on Mac mini

    After moving houses, I don't have any land line with internet. I have now got mobile internet from Vodafone connected to my Mac mini. This I share over the ethernet port and feed into my Airport extreme base station (AEBS) WAN port.
    Also, my blackbook is connected to the AEBS via ethernet cable. Iphone and Ipad to be connected over WiFi.
    Mobile internet > MacMini USB > MacMini shared ethernet > AEBS > Blacbook >> iPhone & iPad.
    What is the best way to set up AEBS? To share a public internet address? As a brigde? To distribute a IP range?
    And also what IP ranges AEBS would work on as default.
    Also: the shared ethernet port on the Mini, should that be configured by DHCP or some other way. Now it says it has a self assigned IP and may not be able to connect.
    I have tried a lot, but I am not a network savy person.
    Any help and suggestions are welcome.
    Jan
    Message was edited by: Velkey-Solvberg

    After moving houses, I don't have any land line with internet. I have now got mobile internet from Vodafone connected to my Mac mini. This I share over the ethernet port and feed into my Airport extreme base station (AEBS) WAN port.
    Also, my blackbook is connected to the AEBS via ethernet cable. Iphone and Ipad to be connected over WiFi.
    Mobile internet > MacMini USB > MacMini shared ethernet > AEBS > Blacbook >> iPhone & iPad.
    What is the best way to set up AEBS? To share a public internet address? As a brigde? To distribute a IP range?
    And also what IP ranges AEBS would work on as default.
    Also: the shared ethernet port on the Mini, should that be configured by DHCP or some other way. Now it says it has a self assigned IP and may not be able to connect.
    I have tried a lot, but I am not a network savy person.
    Any help and suggestions are welcome.
    Jan
    Message was edited by: Velkey-Solvberg

  • How can I use share internet from Mac to iphone usb

    What I did is check the share internet option from Mac -> from Ethernet to iphone usb.
    It doesn't work.
    No internet connected in iphone!
    I don't want connect through wifi.
    Please help.

    Sync using iTunes: http://support.apple.com/kb/HT1386

  • Is it possible to share internet from Mac to iPhone using USB?

    Can i use the:
    System Preferences,
    Internet sharing,
    Share your connection:
         From Ethernet
         To computers using iPhone USB
    to share my Mac's internet connection to my iPhone?
    I hadn't noticed the "To computers using: iPhone USB" option previously. Is this what it's intended for?

    Hi Farook
    This site tells you it can be done, but not how to do it :-(
    Using Bluetooth as your Internet Connection
    -- http://www.russellbeattie.com/notebook/1001649.html
    -- http://www.russellbeattie.com/notebook/1001651.html
    There's a solution available for several SE / Moto / Nokia devices
    GnuBox (Symbian OS)
    -- http://gnubox.dnsalias.org/gnubox/#faqwhy
    These are for certain Sony Ericsson models, and require that you install the SE JDK on your PC
    -- http://manojnair.name/2006/11/06/internet-over-bluetooth-from-computer/
    -- http://www.esato.com/board/viewtopic.php?topic=55565
    Using these as a starting point, I wonder if you will be able to come up with a j2me solution ?!? It would definitely be appreciated by one and all.
    Wish you luck, Darryl

  • Can I share internet from a airport express via the ethernet port

    I have a older airport express that I am trying to you to share the internet with a Marantz AV receiver. I used to be able to share the internet to a PS2 a few years back.
    I was able to set up another network parallel to my normal wireless network with an older moonbase style airport extreme using WDS.
    I am unsure if this is the limitation that apple has introduced to the unit, or it is a Telstra firewall issue.
    Is it possible using a combination of Airport Etremes or expresses to share the internet to a wired unit?

    I have a new airport extreme that I use all the time. I was using the older airport express for airplay.
    The older airport extreme I just pulled down from the cupboard trying to get the AVR connected.
    Since posting I have able to use the Airport extreme to connect the AVR via the ethernet port.
    Still curious why I cannot connect using the airport express.
    Interestingly the older airport extreme pushed the new airport extreme into WDS mode. Tried to hook up the express and it did not work.

Maybe you are looking for

  • Can not get MacBook Pro to display on Sony HDTV LCD

    So I bought a DVI to RGB (Y/Pb/Pr) cable. I have it hooked up and use Detects Displays. It detects a VGA connection but it will not show a picture on the TV. I have verified I am on the right input on the display and checked all just in case. I can't

  • Signatures not firing correctly

    I'm having an issue with signatures not firing correctly. Some of the backdoor trojan signatures are firing, the NSDB says that it is looking for a certain string in the packet going over a certain port. This has happened on several signatures. I get

  • Publicly sharing PDF's with form fields, tags and bookmars.

    I'm looking to be able to share a PDF document so that my coworkers are able to acces this document. I'm very aware of various ways to share the PDF, via email or Google Docs, but I need some sort of hosting that will support form fields, tags and bo

  • Solved WiFi issue - Hope it works for you. If not, sorry.

    Hey, I know about your problem. I've been a Windows person for fifteen years and bought a MacBook Pro about eight hours ago and same problem. Been researching it for eight hours and got it to work. I don't know much, but you can try this and maybe it

  • Array size calculation

    Hi All, I have a small question.I am using SunOS 5.9 and gcc 4.0 compiler. Please take a look at the below code When I compile the following program under gcc 4.0 it doesn't give me any compiler error and even the size comes correctly. #include<stdio