noob-at-networking Posted October 9, 2012 Share Posted October 9, 2012 i wanted to use my Debian machine to share the internet that is connected to eth0 with wlan0 so that I don't have to sit next to my Ethernet socket on in my wall when ever I want to use my laptop. I could just go and my a wireless router but I thought that since my desktop is going to be sitting next to the socket all of the time it my be time to give it a new purpose and expand on my none existent Debian skills. So I found some tutorials on the internet about creating ad-hoc networks and sharing the internet between them. That all went well until I came connect to the ad-hoc network. I can connect just fine however I can't share my internet from my desktop to my laptop. my desktop is a fresh installation of Debian and my laptop is windows7 . I used ip tables as a firewall and for forwarding the internet. Any help on how to fix this would be great. Just ask if I forgot to post any necessary information. Quote Link to comment Share on other sites More sharing options...
01000010 Posted October 9, 2012 Share Posted October 9, 2012 what wifi chip are using on the desktop? Quote Link to comment Share on other sites More sharing options...
pasteywhitecoder Posted October 9, 2012 Share Posted October 9, 2012 echo 1 > /proc/sys/net/ipv4/ip_forward Make sure your FORWARD iptables have no restrictions on them. Quote Link to comment Share on other sites More sharing options...
noob-at-networking Posted October 10, 2012 Author Share Posted October 10, 2012 echo 1 > /proc/sys/net/ipv4/ip_forward Make sure your FORWARD iptables have no restrictions on them. I have just tried this command however the wireless ad-hoc still has no internet. Quote Link to comment Share on other sites More sharing options...
pasteywhitecoder Posted October 10, 2012 Share Posted October 10, 2012 sudo iptables -L FORWARD You'll get a header row and then data. What's the policy and are there any rows below the header? Quote Link to comment Share on other sites More sharing options...
noob-at-networking Posted October 11, 2012 Author Share Posted October 11, 2012 sudo iptables -L FORWARD Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT tcp -- anywhere anywhere tcp dpt:www state NEW DROP all -- anywhere anywhere state INVALID,NEW Quote Link to comment Share on other sites More sharing options...
pasteywhitecoder Posted October 11, 2012 Share Posted October 11, 2012 That might be your problem. Do: sudo iptables -L FORWARD --line-numbers That should give you the output for those two policies. Then run: sudo iptables -D FORWARD [line number] replacing [line number] with the actual line number. That should drop those two entries and it should work then. It seems like it's allowing TCP web data, but nothing else (not an expert on iptables, so someone please feel free to correct me). Dropping those two entries should fix it. When you reboot, they should re-appear. If you don't want this, then you can do: iptables-save > my_forwarding_rules.ipt And to restore from it when you boot or log in, you can do: iptables-restore < my_forwarding_rules.ipt And that's it. Give it a whirl and see if it works. Quote Link to comment Share on other sites More sharing options...
noob-at-networking Posted October 11, 2012 Author Share Posted October 11, 2012 I just dropped both of the FORWARD rules and its still not passing the internet though. Any thing else I can try to get this working? Quote Link to comment Share on other sites More sharing options...
pasteywhitecoder Posted October 11, 2012 Share Posted October 11, 2012 Do you have any kind of firewall programs running? That might be blocking it. Other than that and if /proc/sys/net/ipv4/ip_forward is set to 1, then I'm out of ideas. Quote Link to comment Share on other sites More sharing options...
noob-at-networking Posted October 11, 2012 Author Share Posted October 11, 2012 I just ran cat /proc/sys/net/ipv4/ip_forward and it told me that it is set to 1. This was a fresh Debian install so unless there is a default firewall like in windows or I have unknowingly configured iptables to have a firewall then I don't believe I have one. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.