Programming and Scripting :: Gateway easily?



I have a computer where's one wlan and and one lan card. And also a computer where's only one lan card.

I get internet connection only via wlan card.

I need to get two ips for my wlan card. One for that computer and another ip for second computer that is connected to that lan card.

I don't want to have local ip for that another computer that has only a lan card.

So basically:
internet --> modem --> wlan0 --> eth0 --> another computer's eth0

Is there any way to do this with only few commands?
I've found only howtos that are at least five pages long.
If it is that complicated is there a simple script that could to that?

Note: I'm not trying to do this with DSL. So I have all the latest Linux tools installed. And I can compile more if needed.

Hey, why would you want another ip through the wlan for the other comp?

I think there are two easy solutions:
- Add the ip, with either the old wlan0:0 & wlan0:1 thingy, or with ip's label command
- Bridge the eth0 to the wlan, so they appear to be on the same local network, with the other comp having it's own ip

This is what I want.
Basically I need to make computer0's eth0 to act like the modem would.

I don't know much of those commands so I would like to have some kind of examples.

Again I wonder why you want this.. I can only think of one case where you want an own ip to the other comp = when the other comp is your server.. From your pic it would only seem you want to get to internet through the wlan.

Which one do you mean?

I want to give an internet connection to my other computer (computer1) that has no wlan card.
Basically I need to set up my computer (computer0) as a wlan2lan adapter.
I don't want to set up a lenghty wire over three rooms to get connection to that old computer (computer1).
Anyway it's one of my projects. After it's finished I'll move it close to modem.
But now I need to work in a different room and I need an internet connection to it.

And best would be if that computer (computer1) could have own ip without NAT.

Next Page...
original here.