# 2 lancard+1 adsl modem



## lamany1977 (Apr 29, 2011)

Hi all. I want to ask about my configuration. Here is below.

I've installed FreeBSD 7.2 and then I've 2 lan cards and 1 adsl modem and I want to configure it as FreeBSD router.


```
modem ip=192.168.1.1
lancard 1->rl0=192.168.1.2 -> cable connect to modem
lancard 2->rl1=192.168.0.144 -> cable connect to hub switch
```
1. Here is my /etc/rc.conf


```
ifconfig_rl0="inet 192.168.1.2 netmask 255.255.255.0"
ifconfig_rl1="inet 192.168.0.144 netmask 255.255.255.0"
defaultrouter="192.168.1.1" ## to modem ip
hostname="localinternetserver.com"
```

2. Here is my /etc/resolv.conf


```
domain internetserver.com
   nameserver 192.168.1.1 ## to modem ip
```

3. Client windows xp

```
ip  : 192.168.0.100
   gw  : 192.168.0.144
   dns : 192.168.0.144 ## to ip:rl1
```

Everything is fine when I ping http://www.google.com from the server. But if I ping from client it can not reply.

Thanks very much.

irwan-denpasar-bali


----------



## wblock@ (Apr 29, 2011)

See
`% man rc.conf | less +3/gateway_enable`


----------



## lamany1977 (Apr 29, 2011)

wblock said:
			
		

> See
> `% man rc.conf | less +3/gateway_enable`



I've read, looks like too many parameters. Can you give the real sample. Thanks.


----------



## wblock@ (Apr 29, 2011)

http://www.freebsd.org/doc/en_US.IS...network-routing.html#NETWORK-DEDICATED-ROUTER

Also look up firewalls, DHCP, and NAT.


----------



## SirDice (Apr 29, 2011)

Yep, you will need to use gateway_enable to turn on routing. 

But besides that you will also need to configure NAT.


----------



## lamany1977 (Apr 30, 2011)

Thanks for the solution. Can you give me some tutorial or article, so I can learn the details?

Thanks a lot.


----------

