View previous topic :: View next topic |
Author |
Message |
ai Apprentice
Joined: 21 Mar 2004 Posts: 227 Location: Poland, Krk
|
Posted: Sat Jun 05, 2004 8:28 am Post subject: routing with a 2.6 kernel |
|
|
hi.
Ok let's say i've got something like a server and a laptop, both running Gentoo. Both have a 2.6.6-mm5 kernel. The server is connected with the laptop and with a adsl modem. Now my question is can somebody tell me step by step how to make it that this server will act as getaway for the laptop. What modules do i have to mark in menuconfig when compiling the kernel? What do i have to do later? Please help me ;] _________________ just nothing |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54798 Location: 56N 3W
|
Posted: Sat Jun 05, 2004 8:49 am Post subject: |
|
|
ai,
You have two choices. If you have two spare IP addresses in the same subnet as that allocated to the outside world interface, you can set up forwarding. If you only have a single IP address, or a dynamically allocated IP address, this option is not for you.
If you don't have spare IP addresses, you need Network Address Translation and Masquradeing (sp). This allows you to use one of the private IP ranges for your own network but packets to the internet appear to all come from the one IP address.
You need to set up iptables in the kernel and find one of the firewall scripts to configure it. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
ai Apprentice
Joined: 21 Mar 2004 Posts: 227 Location: Poland, Krk
|
Posted: Sat Jun 05, 2004 9:11 am Post subject: |
|
|
ok so definetly the second option.
Now could somebody tell me how to configure the kernel and then iptables (a link to a guide would be also allright). Acctually i knew it from the beginning that i have to NAT my laptop, and that's why my question tends to be :
Quote: | You need to set up iptables in the kernel and find one of the firewall scripts to configure it. | how to do it? _________________ just nothing |
|
Back to top |
|
|
|