1 |
On 12.02, Dan Sheffner wrote: |
2 |
> I'm trying to setup dual nics on my server but I seem to be doing something wrong. Below is my /etc/conf.d/net |
3 |
> file. As you can see my public address pointing to the web is 70.88.74.105 and the local one is 10.1.10.5. As |
4 |
> soon as I enamble eth1 eth0 won't ping out from another box. It may be something simple but I don't know what I'm |
5 |
> doing wrong. Please help. |
6 |
> |
7 |
> This blank configuration will automatically use DHCP for any net.* |
8 |
> # scripts in /etc/init.d. To create a more complete configuration, |
9 |
> # please review /etc/conf.d/net.example and save your configuration |
10 |
> # in /etc/conf.d/net (this file :]!). |
11 |
> config_eth0=( "70.88.74.105 netmask 255.255.255.0 broadcast 70.255.255.255") |
12 |
> config_eth1=( "10.1.10.5 netmask 255.255.255.0 broadcast 10.1.10.255") |
13 |
> # Here's how todo routing if you need it - the below sets the default gateway |
14 |
> routes_eth0=( |
15 |
> "default via 70.88.74.110" |
16 |
> ) |
17 |
|
18 |
Your eth0 broadcast address is obviously wrong, it should be 70.88.74.255 |
19 |
according to the netmask you've specified. How did you come up with these |
20 |
values? Were they given to you from your ISP? Anyway, by using the following, |
21 |
alternative (and shorter) syntax you're more likely to set the different |
22 |
parameters correctly: |
23 |
|
24 |
config_eth0=( "70.88.74.105/24") |
25 |
config_eth1=( "10.1.10.5/24") |
26 |
|
27 |
Also, but possibly depending on what you're going to use this box for, |
28 |
you need to at leat: |
29 |
|
30 |
- enable ip forwarding in /etc/sysctl.conf |
31 |
|
32 |
- activate iptables or something like it to protect the Internet facing interface |
33 |
from unwanted attention |
34 |
|
35 |
Have a look at the following guide, if you didn't already: |
36 |
http://www.gentoo.org/doc/en/home-router-howto.xml |
37 |
|
38 |
-- |
39 |
Jo. |