>В ядре DIVERT прописан (это мы уже проходили :))
>
>[[ A pri4em tut 1.0.0.2 ? Naskolko ja vizu u tebja vnutri
>
>10.xxx.xxx.xxx ?! ]] - внутри (в квартире) 3 компа 1.0.0.х с статичными
>айпишками. и эти 3 компа надо посадить на 1 айпи в
>локальной сети (10.0.11.21).
>так.
>
Teper ponal.
>ifconfig:
>rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> inet 1.0.0.1 netmask 0xffffff00
>broadcast 1.0.0.255
> inet6 fe80::202:44ff:fe6b:dffa%rl0 prefixlen 64
>scopeid 0x1
> ether 00:02:44:6b:df:fa
> media: Ethernet autoselect (100baseTX <full-duplex>)
> status: active
>rl1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> inet6 fe80::250:22ff:fe90:e1ea%rl1 prefixlen 64
>scopeid 0x2
> inet 10.0.11.21 netmask 0xffffff00
>broadcast 10.0.11.255
> ether 00:50:22:90:e1:ea
> media: Ethernet autoselect (100baseTX <full-duplex>)
> status: active
>______________________________
>
>ipfw:
>00100 allow ip from any to any via rl0
>00200 allow tcp from any to any via rl0
>00300 allow udp from any to any via rl0
>00400 allow icmp from any to any via rl0
>02225 divert 8668 ip from any to any
>02226 allow tcp from any to any
>02227 allow ip from any to any
>02228 allow icmp from any to any
>65535 deny ip from any to any
>_____________________________
>
>rc.conf:
>tcp_extension="NO"
>tcp_drop_synfin="yes"
>icmp_drop_redirect="yes"
>gateway_enable="YES"
>natd_enable="YES"
>natd_interface="10.0.11.21"
>kern_securelevel_enable="NO"
>nfs_reserved_port_only="YES"
>sendmail_enable="YES"
>sshd_enable="YES"
>moused_enable="YES"
>ifconfig_rl0="inet 1.0.0.1 netmask 255.255.255.0"
>hostname="eternity.darktown.lan"
>firewall_enable="yes"
>firewall_type="/etc/fw.conf"
>ifconfig_rl1="DHCP"
>hostname="eternity.darktown.lan"
>____________________________
>
>natd.conf:
>redirect_port tcp 1.0.0.2:6667 6667
>redirect_port tcp 1.0.0.2:80 80
>_________________________________
Togda probui tak:
1)cat rc.conf
...
gateway_enable="YES"
natd_enable="YES"
natd_interface="rl1"
natd_flags="-f /etc/natd.conf" # ili gde u tebja on lezit.
firewall_enable="yes"
firewall_type="OPEN"
...
2)cat natd.conf
redirect_port tcp 1.0.0.2:6667 6667
redirect_port tcp 1.0.0.2:80 80
3) Vopros v tom kak tam u tebja DHCP rabotajet. Esli adres menajetca, togda eto nado u4itivat pri sotavlenii pravil ipfw.
4) V sleduju6ih pravilah net smisla esli idut pravila allow ip from any to any:
a) 00200 allow tcp from any to any via rl0
00300 allow udp from any to any via rl0
b) 02226 allow tcp from any to any
c) 02228 allow icmp from any to any
man ipfw:
...
protocol: [not] protocol-name | protocol-number
An IPv4 protocol specified by number or name (for a complete list
see /etc/protocols). The ip or all keywords mean any protocol
will match.
...
Esli vse budet rabotat togda na4inai sostavlat pravila dla ipfw.