# freebsd gateway. help



## javid (Jun 10, 2009)

1 unix pc has 2 nics. and act as gateway, for 1 windows xp pc.
ping works between them, but nor unix, neither windows, cant access to internet. also unix use adsl as bridge.
can i give adsl modem's ip to freebsd as dns, or to windows?.
it is very important to acceess internet. thanks.


----------



## trev (Jun 10, 2009)

javid said:
			
		

> but nor unix, neither windows, cant access to internet.



You'll need to be a little more specific than this. What happens? What are the error messages? Does DNS resolve IP addresses? Can the machine with the ADSL bridge access the Internet?


----------



## anomie (Jun 11, 2009)

Also, from the FreeBSD box post the output of: 

 `# ifconfig`
 `# netstat -rn`


----------



## javid (Jun 11, 2009)

ok. now, i can ping from freebsd to default router. but cant ping from win xp. via freebsd. also freebsd as gateway. how can configure unix to receive ping from windows xp, and pass it to internet?.
thanks.


----------



## SirDice (Jun 11, 2009)

Please provide the information. We cannot help you if we do not know how your network is set up. 

We're good but we're not clairvoyant.


----------



## javid (Jun 11, 2009)

freebsd pc has 2 nics, rl0 192.168.5.27, rl1 192.168.0.27. also configured as gateway. in rc.conf. and access to internet via adsl modem (pppoe). it can ping to internet site's ip. but another pc windows xp, cant ping internet address, only between freebsd and windows can ping. 
i want to access to internet from windows machine. windows pc configured correct.


----------



## SirDice (Jun 11, 2009)

Do you have *gateway_enable="YES"* in /etc/rc.conf?

You also need to set up your DSL modem to route 192.168.5.0/24 back to the freebsd box. That's assuming the 192.168.0.0/24 network is between the freebsd box and the DSL modem.


----------



## javid (Jun 11, 2009)

yes gateway_enable=yes.
i think it is not modem issue.


----------



## SirDice (Jun 11, 2009)

javid said:
			
		

> i think it is not modem issue.


Yes, it is. Your modem doesn't know where traffic to 192.168.5.0/24 goes to. You need to add that route on the modem.


----------



## DutchDaemon (Jun 11, 2009)

Or use NAT on the gateway if you can't do anything with the modem.


----------



## javid (Jun 11, 2009)

ok. also i installed dns. and now it pings to by name. and by ip.
oo yess. pretty f....ng sad.


----------



## javid (Jun 12, 2009)

is it important to enable firewall for natd?
options IPFIREWALL
options IPDIVERT
for kernel?.


----------



## SirDice (Jun 12, 2009)

javid said:
			
		

> is it important to enable firewall for natd?
> options IPFIREWALL
> options IPDIVERT
> for kernel?.


Not really, you are behind a modem/router that does NAT for you. No real need to run a second NAT or firewall. You just need to make sure the routing is set up correctly.


----------



## javid (Jun 12, 2009)

DutchDaemon said:
			
		

> Or use NAT on the gateway if you can't do anything with the modem.



is it important firewall for natd? i ddont want to use firewall at all?. for example. :r


----------



## SirDice (Jun 12, 2009)

javid said:
			
		

> is it important firewall for natd? i ddont want to use firewall at all?. for example. :r



And you don't need NAT either.


----------



## javid (Jun 12, 2009)

SirDice said:
			
		

> And you don't need NAT either.



then pls tell me, if i dont need nat. what is pppoe profile?
yes i read pppoe docs, but PROFILE. 
is it login, password, ?


----------



## javid (Jun 12, 2009)

Dual-homed host. In a dual-homed environment, a PC is configured as a gateway between the local LAN and the DSL modem. With a bridged or routed DSL connection, this gateway can be configured as either a router or a NAT/proxy server. With a PPPoE DSL connection, this gateway would have to be configured as a NAT/proxy server (because the PPPoE protocol wonâ€™t pass over

the gateway).


----------



## SirDice (Jun 12, 2009)

javid said:
			
		

> then pls tell me, if i dont need nat. what is pppoe profile?


That's usually done in the modem/router itself these days. What modem/router do you have?


----------

