# Routing problem



## nasroo (Jul 4, 2012)

Hello, 

My problem is that i can not connect to the internet from my FreeBSD-Server. I am using a router which is connected to the ISP with static IP. The local IP of my router is 192.168.100.250. The IP of my FreeBSD-Server is 192.168.100.105. 

I'm going to show you now my configured files:


/etc/rc.conf



```
hostname="MYDOMAINNAME"
keymap="german.iso.acc.kbd"
sshd_enable="YES"
moused_enable="YES"
ntpd_enable="YES"
ftpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
hostname="server.mydomainname"
ifconfig_em0="inet 192.168.100.105 netmask 255.255.255.0"
Defaultrouter="192.168.100.250"
apache22_enable="YES"
Mysql_enable="YES"
inetd_enable="YES"
```


/etc/hosts




```
::1                     localhost localhost.mydomain
127.0.0.1               localhost localhost.mydomain
192.168.100.105         server.mydomain server
192.168.100.105         server.mydomain.
```



[CMD=]netstat -rn[/CMD]


```
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
127.0.0.1          link#4             UH          0        0    lo0
192.168.100.0/24   link#1             U           0     1386    em0
192.168.100.105    link#1             UHS         0        0    lo0

Internet6:
Destination                       Gateway                       Flags      Netif Expire
::/96                             ::1                           UGRS        lo0
::1                               ::1                           UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%em0/64                     link#1                        U           em0
fe80::4637:e6ff:fe81:186b%em0     link#1                        UHS         lo0
fe80::%lo0/64                     link#4                        U           lo0
fe80::1%lo0                       link#4                        UHS         lo0
ff01::%em0/32                     fe80::4637:e6ff:fe81:186b%em0 U           em0
ff01::%lo0/32                     ::1                           U           lo0
ff02::/16                         ::1                           UGRS        lo0
ff02::%em0/32                     fe80::4637:e6ff:fe81:186b%em0 U           em0
ff02::%lo0/32                     ::1                           U           lo0
```

In my local network i can reach all the clients. I can ping the router without any package loss. 


```
server# ping 192.168.100.250
PING 192.168.100.250 (192.168.100.250): 56 data bytes
64 bytes from 192.168.100.250: icmp_seq=0 ttl=64 time=0.812 ms
64 bytes from 192.168.100.250: icmp_seq=1 ttl=64 time=0.759 ms
64 bytes from 192.168.100.250: icmp_seq=2 ttl=64 time=0.616 ms
64 bytes from 192.168.100.250: icmp_seq=3 ttl=64 time=0.602 ms
64 bytes from 192.168.100.250: icmp_seq=4 ttl=64 time=0.738 ms
^C
--- 192.168.100.250 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.602/0.705/0.812/0.082 ms
server# ping www.yahoo.com
ping: cannot resolve www.yahoo.com: Host name lookup failure
server#
```

Can anyone help me in this case?

Thank you in advance. 

Nas


----------



## SirDice (Jul 4, 2012)

You forgot to configure resolv.conf(5).

NB. /etc/rc.conf is case-sensitive, Defaultrouter is not the same as defaultrouter.


----------



## nasroo (Jul 4, 2012)

Hi SirDice, 

I changed Defaultrouter in defaultrouter in /etc/rc.conf 

And now its working. My bad  

Thank you alot. 

Nas


----------

