Hi. I`m a newby to FreeBSD and i`ve got some problems while configuring my gateway.
I want to share my public lan (ed1 - 10.1.0.0/16) to anyone in my private lan (ed0 - 192.168.1.0/24).
I compiled and installed kernel with following options:
/etc/rc.conf has following lines:
/etc/firewall:
I can ping both pc`s in both lans - 192.168.1.0/24 and 10.1.0.0/16 from FreeBSD.
When I try to use it as gateway (I sing in gateway: 192.168.1.1 and some ip in my windows pc) time limits out. The problem is in /etc/firewall but I don`t know how work it out.
Plese help.
I want to share my public lan (ed1 - 10.1.0.0/16) to anyone in my private lan (ed0 - 192.168.1.0/24).
I compiled and installed kernel with following options:
Code:
options IPFIREWALL
options IPFIREWALL_VERBOSE
options IPFIREWALL_VERBOSE_LIMIT=50
options IPFIREWALL_NAT
options LIBALIAS
options ROUTETABLES=2
options DUMMYNET
options HZ="1000"
/etc/rc.conf has following lines:
Code:
gateway_enable="YES"
ifconfig_ed0="inet 192.168.1.1 netmask 255.255.255.0"
ifconfig_ed1="inet 10.1.201.200 netmask 255.255.0.0"
defaultrouter="10.1.254.254"
firewall_enable="YES"
firewall_type="/etc/firewall"
/etc/firewall:
Code:
add 1000 allow ip from 10.1.201.200 to any out xmit ed1
add 1010 allow ip from any to 10.1.201.200 in recv ed1
add 1040 allow ip from any to any via ed0
add 1050 deny ip from any to 192.168.0.0/16 in recv ed1
add 1060 deny ip from 192.168.0.0/16 to any in recv ed1
add 1070 deny ip from any to 172.16.0.0/12 in recv ed1
add 1080 deny ip from 172.16.0.0/12 to any in recv ed1
add 1090 deny ip from any to 10.0.0.0/8 in recv ed1
add 10100 deny ip from 10.0.0.0/8 to any in recv ed1
add 10110 deny ip from any to 169.254.0.0/16 in recv ed1
add 10120 deny ip from 169.254.0.0/16 to any in recv ed1
nat 1 config if ed1 log deny_in same_ports reset
add 10130 nat 1 tcp from any to any out xmit ed1 limit src-addr 20
add 10140 nat 1 ip from any to any out xmit ed1
add 10150 nat 1 ip from any to any in recv ed1
add 65534 deny all from any to any
I can ping both pc`s in both lans - 192.168.1.0/24 and 10.1.0.0/16 from FreeBSD.
When I try to use it as gateway (I sing in gateway: 192.168.1.1 and some ip in my windows pc) time limits out. The problem is in /etc/firewall but I don`t know how work it out.
Plese help.