rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 3:06 pm

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?
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 3:15 pm

I really hate it when all of the search engines are down.
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 3:36 pm

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...

;)
marcus
:ugeek:

rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 3:37 pm

I looked on google but I couldn't find an answer. I found something about iptables but I got stuck.
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

fruitoftheloom
Posts: 23337
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 3:52 pm

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
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 3:57 pm

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


.
marcus
:ugeek:

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 4:06 pm

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.

rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 4:14 pm

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.
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 4:17 pm

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.

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 4:17 pm

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?
marcus
:ugeek:

rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 4:42 pm

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!
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

User avatar
allfox
Posts: 452
Joined: Sat Jun 22, 2013 1:36 pm
Location: Guang Dong, China

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 4:44 pm

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.

User avatar
DougieLawson
Posts: 39120
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 4:51 pm

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.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
Jednorozec
Posts: 809
Joined: Sun Nov 24, 2013 2:17 pm
Location: Deposit, NY

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 4:55 pm

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
The most important leg of a three legged stool is the one that's missing.
It's called thinking. Why don't you try it sometime?

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 4:58 pm

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.
Memory in C++ is a leaky abstraction .

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 5:06 pm

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!
Memory in C++ is a leaky abstraction .

rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 5:16 pm

Well I tried iptables -A FORWARD -i wlan0 -o wlan1 -j ACCEPT but it didn't work.
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

gkreidl
Posts: 6326
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 5:59 pm

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.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 6:22 pm

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.
There are 10 types of people: those who understand binary and those who don't.

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 6:44 pm

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!
Memory in C++ is a leaky abstraction .

User avatar
kusti8
Posts: 3439
Joined: Sat Dec 21, 2013 5:29 pm
Location: USA

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 6:57 pm

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.
There are 10 types of people: those who understand binary and those who don't.

Heater
Posts: 15949
Joined: Tue Jul 17, 2012 3:02 pm

Re: Sharing my Raspberry Pi's Internet Connection

Sun Jun 07, 2015 7:15 pm

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.
Memory in C++ is a leaky abstraction .

Return to “General discussion”