Hello everybody,
I am trying to set[]up FreeBSD 10 as a router, but am stuck on getting it working. I don't want to switch back to Debian, please help if you can.
The server is a machine with two network interfaces:
(em0) = IP 194.160.184.40 is connected to an optical link router with IP address 194.160.184.33 255.255.255.240
(re0) = IP 192.168.5.1 connected to the internal network using a switch.
FreeBSD should act as a gateway and switch outgoing packets through the optical link.
Here is my rc.conf content:
Content of the /boot/loader.conf:
I can ping any WWW or IP address from the FreeBSD machine and I can ping the local network machine with the assigned DHCP address. But when I try to ping any outside host from the internal network machine or browse websites it does not work.
Looks like FreeBSD is not switching packets from localhost to the .33 gateway for some reason.
Please help.
I am trying to set[]up FreeBSD 10 as a router, but am stuck on getting it working. I don't want to switch back to Debian, please help if you can.
The server is a machine with two network interfaces:
(em0) = IP 194.160.184.40 is connected to an optical link router with IP address 194.160.184.33 255.255.255.240
(re0) = IP 192.168.5.1 connected to the internal network using a switch.
FreeBSD should act as a gateway and switch outgoing packets through the optical link.
Here is my rc.conf content:
Code:
hostname="GYMNAZIUM"
ifconfig_re0="inet 192.168.5.1 netmask 255.255.255.0"
ifconfig_em0="inet 194.160.184.40 netmask 255.255.255.240"
defaultrouter="194.160.184.33"
static_routes="internet local"
route_internet="-net 194.160.184.0/28 194.160.184.33"
route_local="-net 192.168.5.0/24 192.168.5.1"
gateway_enable="YES"
firewall_enable="YES"
firewall_type="OPEN"
natd_enable="YES"
natd_interface="em0"
natd_flags=""
dhcpd_enable="YES"
dhcpd_ifaces="re0"
powerd_enable="YES"
apache24_enable="YES"
apache24_flags=""
dumpdev="AUTO"
inetd_enable="YES"
ipnat_enable="YES"
Code:
net.inet.ip.fw.default_to_accept="1"
ipfw_load="YES"
ipdivert_load="YES"
options IPFIREWALL_DEFAIULT_TO_ACCEPT
options IPFIREWALL_VERBOSE
netstat -r
Code:
destination gateway flags refs use netif
default he-gls-gw.sados.up UGS 0 66 em0
localhost link#3 UH 0 0 lo0
192.168.5.0 link#3 UH 0 0 lo0
192.168.5.1 link#2 U 0 0 re0
194.160.184.0/28 HE-GLS-gw,.ados.up UGS 0 0 em0
194.160.184.32/28 link#1 U 0 0 em0
194.160.184.40 link#1 UHS 0 0 l0
Looks like FreeBSD is not switching packets from localhost to the .33 gateway for some reason.
Please help.