Problem routing

I have FreeBSD 9.1 and need to set up a gateway route. I have not set up a firewall. My ethernet interface rl0 is connecting to a DSL modem at 192.168.2.1, and on xl0 I have a static IP 10.0.0.1 and I have a DHCP server.

My rc.conf:
Code:
hostname="base.kywn"
ifconfig_rl0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
powerd_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
webmin_enable="YES"
ifconfig_xl0="inet 10.0.0.1 netmask 255.255.255.0"
dhcpd_enable="YES"
dhcpd_ifaces="xl0"
gateway_enable="YES"
Code:
dhcpd.conf
option domain-name		"base.kywn";
option domain-name-servers	10.0.0.1;
default-lease-time		3600;
max-lease-time			84600;
option netbios-name-servers 10.0.0.1;

subnet 10.0.0.0 netmask 255.255.255.0 {
	option host-name "kywn";
	ddns-updates off;
	server-name "base.kywn";
	max-lease-time 86400;
	default-lease-time 21600;
	authoritative;
	deny client-updates;
	range 10.0.0.2 10.0.0.254;
	option routers 10.0.0.1;
	}

and routing table

Code:
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            192.168.2.1        UGS         0      296    rl0
10.0.0.0/24        link#1             U           0      122    xl0
10.0.0.1           link#1             UHS         0        0    lo0
10.8.0.0/24        10.8.0.2           UGS         0        0   tun0
10.8.0.1           link#6             UHS         0        0    lo0
10.8.0.2           link#6             UH          0        0   tun0
127.0.0.1          link#5             UH          0       10    lo0
192.168.2.0/24     link#2             U           0      180    rl0
192.168.2.3        link#2             UHS         0        0    lo0

Internet6:
Destination                       Gateway                       Flags      Netif Expire
::/96                             ::1                           UGRS        lo0 =>
default                           2001:5c0:1400:b::10f4         UGS        tun1
::1                               link#5                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
2001:5c0:1400:b::10f4             link#7                        UH         tun1
2001:5c0:1400:b::10f5             link#7                        UHS         lo0
2001:5c0:1502:1400::/64           link#2                        U           rl0 =>
2001:5c0:1502:1400::/56           lo0                           US          lo0
2001:5c0:1502:1400::1             link#2                        UHS         lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%xl0/64                     link#1                        U           xl0
fe80::204:76ff:fed2:a795%xl0      link#1                        UHS         lo0
fe80::%rl0/64                     link#2                        U           rl0
fe80::250:bfff:fe4a:b50e%rl0      link#2                        UHS         lo0
fe80::%lo0/64                     link#5                        U           lo0
fe80::1%lo0                       link#5                        UHS         lo0
fe80::%tun0/64                    link#6                        U          tun0
fe80::204:76ff:fed2:a795%tun0     link#6                        UHS         lo0
fe80::%tun1/64                    link#7                        U          tun1
fe80::204:76ff:fed2:a795%tun1     link#7                        UHS         lo0
ff01::%xl0/32                     fe80::204:76ff:fed2:a795%xl0  U           xl0
ff01::%rl0/32                     fe80::250:bfff:fe4a:b50e%rl0  U           rl0
ff01::%lo0/32                     ::1                           U           lo0
ff01::%tun0/32                    fe80::204:76ff:fed2:a795%tun0 U          tun0
ff01::%tun1/32                    fe80::204:76ff:fed2:a795%tun1 U          tun1
ff02::/16                         ::1                           UGRS        lo0
ff02::%xl0/32                     fe80::204:76ff:fed2:a795%xl0  U           xl0
ff02::%rl0/32                     fe80::250:bfff:fe4a:b50e%rl0  U           rl0
ff02::%lo0/32                     ::1                           U           lo0
ff02::%tun0/32                    fe80::204:76ff:fed2:a795%tun0 U          tun0
ff02::%tun1/32                    fe80::204:76ff:fed2:a795%tun1 U          tun1

I would like to know how I can set up the gateway? I also have had set up gogo6 client and I would like to know how I can route ipv6 packets.
Thanks :D
 
You pretty much did set it up, IPv4 at least. So what is the problem?
Where's dns info for clients?

Start reading on IPv6 in handbook.
 
From a machine behind the FreeBSD gateway, try to ping 192.168.2.1 and that should tell you if it's passing through.

I'm not sure if that's all of your rc.conf, but I did notice you don't have a DNS server enabled, but DHCP is handing out your server address for DNS resolution. You will likely want DHCP to hand out whatever is in /etc/resolv.conf. Probably 192.168.2.1
 
In /etc/resolv.conf I've already put
Code:
nameserver 192.168.2.1

DNS work find ipv4, but can not route, and dhcpd works.
 
Yes, your internet modem/router will need a static route to 10.0.0.0/24.
 
Back
Top