Page 1 of 1

Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 3:06 pm
by rpiswag
I live in a house where sum parts get almost no internet connection because of the walls that block the signal from the router. I had wifi adapters and I don't need a fast connection so I want to use a Raspberry Pi. My pi is connected to my router on wlan0 and I have a wifi network on wlan1. How do I share the internet connection from wlan0 to wlan1?

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 3:15 pm
by Jednorozec
I really hate it when all of the search engines are down.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 3:36 pm
by MarkHaysHarris777
Jednorozec wrote:I really hate it when all of the search engines are down.
I know, right, its like "you know?" what's a guy to do without google and wiki... hope they're back up soon...

;)

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 3:37 pm
by rpiswag
I looked on google but I couldn't find an answer. I found something about iptables but I got stuck.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 3:52 pm
by fruitoftheloom
rpiswag wrote:I looked on google but I couldn't find an answer. I found something about iptables but I got stuck.
https://wiki.debian.org/BridgeNetworkConnections

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 3:57 pm
by MarkHaysHarris777
rpiswag wrote:I looked on google but I couldn't find an answer. I found something about iptables but I got stuck.

https://www.google.com/search?q=network ... d=0CDUQsAQ


.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 4:06 pm
by allfox
I think OP isn't that bad.

As for most people, they won't search for keyword "network bridge", they would just go for "share internet", and that lead to iptables tricks(NAT miseries).

Digging a little deeper would find out the NAT, bridges, iptables. However, most people don't want to dig, they just need something plug and play. It's what most people do, shouldn't be blamed.

Personally I think brave soul is great, but stay ignorance is not a crime. We couldn't know everything.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 4:14 pm
by rpiswag
Well I looked and I saw something about iptables but I wasn't sure what to do. I know you need to do ip forwarding so I did with this command iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE . Then I saw this command
echo 1 > /proc/sys/net/ipv4/ip_forward but I wasn't sure what it did. Thanks allfox that was a interesting post.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 4:17 pm
by allfox
I think you don't need iptables. That's for setting up a router. As you only need to "enlarge" your existing network, so just bridge wlan0 and wlan1 is cool as the others said.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 4:17 pm
by MarkHaysHarris777
allfox wrote:I think OP isn't that bad . . . Personally I think brave soul is great, but stay ignorance is not a crime. We couldn't know everything.
My physics professor once told our class that the smart lady is not she who knows everything, rather she who knows where to find the information she needs at the moment (and then knows how to apply it!).

The problem with the OP's question is that there are 'entire books' written on the subject of bridging subnets. Networking is a complex subject which requires study and hard work. Take baby steps... then read, read, read, and then read some more. After you're well read, and can demonstrate some synthesis, then formulate a 'smart' question and start a dialogue.

My favorite question like this went like so:
some kid wrote:Hi, I'm nine, I want to build a replica of the CERN hadron accelerator in my mumm's basement but all I have now is an Arduino nano and a transistor... does anyone know anything about C++ coding or electronics?

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 4:42 pm
by rpiswag
I will admit that last Post about LHC was funny. It is great to learn about networks and how they work but all I want is to bridge two interfaces together so my brother can get a better internet connection so he stops bugging me. Please help!

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 4:44 pm
by allfox
MarkHaysHarris777 wrote:My physics professor once told our class that the smart lady is not she who knows everything, rather she who knows where to find the information she needs at the moment (and then knows how to apply it!).
That's brilliant~

It's sometimes a paradox. We really should dig more so that we could initiate a better dialogue. However if we dig, we could find out the answer by ourselves, as for this thread's question, it's not that difficult.

Well, yes, I agree we should start with baby steps on our own. Being brave is great.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 4:51 pm
by DougieLawson
MarkHaysHarris777 wrote:
My physics professor once told our class that the smart lady is not she who knows everything, rather she who knows where to find the information she needs at the moment (and then knows how to apply it!).
And that is precisely why rpiswag's posts on this forum are blocked by my profile settings. He/she is 100% helpless when it comes to doing the research before asking his/her inane questions on here.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 4:55 pm
by Jednorozec
DougieLawson wrote:
MarkHaysHarris777 wrote:
My physics professor once told our class that the smart lady is not she who knows everything, rather she who knows where to find the information she needs at the moment (and then knows how to apply it!).
And that is precisely why rpiswag's posts on this forum are blocked by my profile settings. He/she is 100% helpless when it comes to doing the research before asking his/her inane questions on here.
ditto

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 4:58 pm
by Heater
MarkHaysHarris777,
My physics professor once told our class that the smart lady is not she who knows everything, rather she who knows where to find the information she needs at the moment (and then knows how to apply it!).
Whilst I agree with the sentiment there I don't believe a word of the story. If you are as old as your avatar suggests there was no talk of "lady" and "she" at the time.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 5:06 pm
by Heater
rpiswag did once say that he 15 years old. As such I would expect all kind of wild ideas to be forthcoming. Why not? Some easy to fix, some not so easy, some impossible. How can you tell at that age?

Heck, when I was 8 years old I asked my father if connecting the microphone we had in series with some head phones and a battery would work. He said "No, because ...bla bla". We did it anyway, it worked!

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 5:16 pm
by rpiswag
Well I tried iptables -A FORWARD -i wlan0 -o wlan1 -j ACCEPT but it didn't work.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 5:59 pm
by gkreidl
MarkHaysHarris777 wrote:...
The problem with the OP's question is that there are 'entire books' written on the subject of bridging subnets. Networking is a complex subject which requires study and hard work. Take baby steps... then read, read, read, and then read some more. After you're well read, and can demonstrate some synthesis, then formulate a 'smart' question and start a dialogue.

My favorite question like this went like so:
some kid wrote:Hi, I'm nine, I want to build a replica of the CERN hadron accelerator in my mumm's basement but all I have now is an Arduino nano and a transistor... does anyone know anything about C++ coding or electronics?
Rather young children often ask the famous "why" questions, like "Why do people die?" You would answer
The problem is there are 'entire books' written on that subject. Living and dying is a complex subject which requires study and hard work. Take baby steps... then read, read, read, and then read some more. After you're well read, and can demonstrate some synthesis, then formulate a 'smart' question and start a dialogue.
If I remember correctly you once mentioned that you are a teacher. Poor kids.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 6:22 pm
by kusti8
Heater wrote:rpiswag did once say that he 15 years old. As such I would expect all kind of wild ideas to be forthcoming. Why not? Some easy to fix, some not so easy, some impossible. How can you tell at that age?

Heck, when I was 8 years old I asked my father if connecting the microphone we had in series with some head phones and a battery would work. He said "No, because ...bla bla". We did it anyway, it worked!

It also depends on the maturity. Some kids are just curious, but what annoys me is that rpiswag thinks this is a hotline. I'm 13 and (I like to think that) I'm mature. I use Google about 50-100 times a day for my latest ambitious project, usually more.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 6:44 pm
by Heater
kusti8

I do agree with you, curiosity is a wonderful thing. Followed by experiment. Success or failure, you learn something.

I'm not so clear on that "maturity" thing.

Now that I am nearer the end of life than the beginning I start to think most people never achieve maturity, whatever it is supposed to be. Better to be forever curious than to mature and "know" the answers.

I'm with you on the Google thing. Gone are the days of "Here is the problem, here is the programming manual, make a solution". I cannot work without Google any more!

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 6:57 pm
by kusti8
I'm not so clear on that "maturity" thing.
I'm not so clear on it either. :D

I guess what I'm trying to say is that this forum of any forum is people committing their time. It's not a hotline, it's more of a discussion. So don't ask any small question, because the web is fulled with people who have already asked the same question. Research. Research. Research.

Oh, Google is wonderful. I can't live without it.

And curiosity, that's the motivation behind every sane, capable and smart person on the planet. But curiosity is also being able to do things on your own. No more hand holding. Ah, I guess that's what I meant when I mentioned matureness.

Well, that's my two cents.

Re: Sharing my Raspberry Pi's Internet Connection

Posted: Sun Jun 07, 2015 7:15 pm
by Heater
Yep,

I just wish we could have google without Google. If you see what I mean.

The internet as a world wide connection of humans should not have to rely on one central entity like Google.

Surely there must be a way to distribute our questions and answers, our knowledge, around the net without a central index.

Something for you to think about as you live into the next 100 years or so. Too late for me.