Milí majitelé routerů Turris,
toto fórum bylo 9. 12. 2016 zmrazeno a nahrazeno naším novým Turris fórem. Ještě chvíli bude dostupné k prohlížení, ale již zde není možné přispívat. Více informací naleznete v oznámení o uzavření fóra.
Dear Turris routers users,
this forum has been frozen on Dec 9th, 2016 and replaced by our new Turris forum. It will be read-only accessible for some time after. For more information, read the announcement about closing the forum.
config interface 'lan' option ifname 'eth1' … config interface 'wan' #option ifname 'eth2' option ifname 'eth0' option proto 'dhcp' #Tohle je LAN - eth1 config switch_vlan option device 'switch0' option vlan '1' option ports '0 1 2 ' #Tohle je ve skutecnosti WAN zapojeny do LAN1 - eth0 config switch_vlan option device 'switch0' option vlan '2' option ports '3 4 5 6'
/etc/config/network
. Když se použije místo eth2 rozhraní eth0, bude Turris brát veřejnou IP adresu z kabelu zapojeného v konektorech LAN1-LAN3.config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'auto' config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option ip6assign '60' option ipaddr '192.168.88.1' option _orig_ifname 'eth0 eth1 wlan0' option _orig_bridge 'true' option ifname 'eth1' config interface 'wan' option proto 'dhcp' option _orig_ifname 'eth2' option _orig_bridge 'false' option ifname 'eth0' config interface 'wan6' option ifname '@wan' option proto 'dhcpv6' config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option ports '0 1 2' option vid '1' config switch_vlan option device 'switch0' option vlan '2' option ports '3 4 5 6' option vid '2'
config interface 'lan'
řádek option ifname 'eth1'
a upravte do podoby option ifname 'eth1 eth2'
.config interface 'wan' option proto 'dhcp' option type 'bridge' option ifname 'eth0 eth2' config switch_vlan option device 'switch0' option vlan '1' option ports '0 1 2 5' option vid '1' config switch_vlan option device 'switch0' option vlan '2' option ports '3 4 6' option vid '2'
/etc/config/network
zkopírujte blok config interface 'lan'
do nového bloku třeba config interface 'publiclan'
. Prvními přiřaďte třeba eth1, druhému eth0. Pro příklad jsem zvolil veřejný blok 192.0.2.64/26./etc/config/dhcp
.masq_src
, že se mají NATovat pouze privátní adresy. Jediné co jsem nedomyslel je jak nastavit veřejnou adresu na kterou bude NATováno. Standardně se bude NATovat na tu adresu, která je přiřazena rozhraní WAN. Pokud by bylo potřeba NATovat na některou z veřejných adres, asi se to nedá snadno vyřešit pomocí UCI firewallu, ale je potřeba přímo zadat příslušné pravidlo do iptables (ve tvaru … -j SNAT --to-source <veřejná adresa>
)
/etc/config/network: config interface 'publiclan' option ifname 'eth0' #option type 'bridge' option proto 'static' option ipaddr '192.0.2.64' option netmask '255.255.255.192' option ip6assign '60' /etc/config/dhcp: config dhcp 'publiclan' option interface 'publiclan' option start '66' option limit '10' option leasetime '12h' option ignore '0' /etc/config/firewall: config zone option name wan list network 'wan' list network 'wan6' option input REJECT option output ACCEPT option forward REJECT option masq 1 option mtu_fix 1 option log true option log_prefix 'turris-000000: ' option log_limit '60/minute' option log_level debug option masq_src 192.168.88.0/24
config wan wan option autodetect 0 config interface option ifname 'eth2' # Při předpokladu, že je kabel od poskytovatele opravdu zapojen v zásuvce WAN = eth2
option netmask '255.255.255.0' option gateway '10.99.99.1' option dns '217.170.96.24 217.170.96.2' config interface 'wan6' option ifname '@wan' option proto 'dhcpv6' config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option ports '0 1 2 3 4 ' config switch_vlan option device 'switch0' option vlan '2' option ports '5 6'
IP konfigurace na LAN1: Connection-specific DNS Suffix . : lan Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection Physical Address. . . . . . . . . : D4-C9-EF-E9-35-79 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::d8b0:fff7:5670:e9bf%3(Preferred) IPv4 Address. . . . . . . . . . . : 123.123.123.243(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.248 Lease Obtained. . . . . . . . . . : 12. května 2014 21:27:15 Lease Expires . . . . . . . . . . : 13. května 2014 9:27:15 Default Gateway . . . . . . . . . : 123.123.123.240 DHCP Server . . . . . . . . . . . : 123.123.123.240 DHCPv6 IAID . . . . . . . . . . . : 64276975 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-CC-CD-74-D4-C9-EF-E9-35-79 DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1 fec0:0:0:ffff::2%1 fec0:0:0:ffff::3%1 NetBIOS over Tcpip. . . . . . . . : Enabled Konfiguráky na routeru /etc/config/network config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0' config globals 'globals' option ula_prefix 'auto' config interface 'lan' option ifname 'eth1' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option ip6assign '60' option ipaddr '192.168.88.1' config interface 'publiclan' option ifname 'eth0' #option type 'bridge' option proto 'static' option ipaddr '123.123.123.240' option netmask '255.255.255.248' option ip6assign '60' config interface 'wan' option ifname 'eth2' option proto 'static' option ipaddr '10.99.99.2' option netmask '255.255.255.0' option gateway '10.99.99.1' option dns '217.170.96.24 217.170.96.2' config interface 'wan6' option ifname '@wan' option proto 'dhcpv6' config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option ports '0 1 2 3 4 ' config switch_vlan option device 'switch0' option vlan '2' option ports '5 6' /etc/config/dhcp config dnsmasq option domainneeded '1' option boguspriv '1' option filterwin2k '0' option localise_queries '1' option rebind_protection '1' option rebind_localhost '1' option local '/lan/' option domain 'lan' option expandhosts '1' option nonegcache '0' option authoritative '1' option readethers '1' option leasefile '/tmp/dhcp.leases' option resolvfile '/tmp/resolv.conf.auto' option port '0' config dhcp 'lan' option interface 'lan' option start '100' option leasetime '12h' option ignore '0' option limit '200' list dhcp_option '6,192.168.88.1' config dhcp 'publiclan' option interface 'publiclan' option start '242' option limit '247' option leasetime '12h' option ignore '0' config dhcp 'wan' option interface 'wan' option ignore '1' /etc/config/firewall config defaults option syn_flood '1' option input 'ACCEPT' option output 'ACCEPT' option forward 'REJECT' config zone option name 'lan' list network 'lan' option input 'ACCEPT' option output 'ACCEPT' option forward 'ACCEPT' config zone option name 'wan' list network 'wan' list network 'wan6' option input 'REJECT' option output 'ACCEPT' option forward 'REJECT' option masq '1' option mtu_fix '1' option log 'true' option log_prefix 'turris-000000: ' option log_limit '60/minute' option log_level 'debug' option masq_src '192.168.88.0/24' config forwarding option src 'lan' option dest 'wan' config rule option name 'Allow-DHCP-Renew' option src 'wan' option proto 'udp' option dest_port '68' option target 'ACCEPT' option family 'ipv4' config rule option name 'Allow-Ping' option src 'wan' option proto 'icmp' option icmp_type 'echo-request' option family 'ipv4' option target 'ACCEPT' config rule option name 'Allow-DHCPv6' option src 'wan' option proto 'udp' option src_ip 'fe80::/10' option src_port '547' option dest_ip 'fe80::/10' option dest_port '546' option family 'ipv6' option target 'ACCEPT' config rule option name 'Allow-ICMPv6-Input' option src 'wan' option proto 'icmp' list icmp_type 'echo-request' list icmp_type 'echo-reply' list icmp_type 'destination-unreachable' list icmp_type 'packet-too-big' list icmp_type 'time-exceeded' list icmp_type 'bad-header' list icmp_type 'unknown-header-type' list icmp_type 'router-solicitation' list icmp_type 'neighbour-solicitation' list icmp_type 'router-advertisement' list icmp_type 'neighbour-advertisement' option limit '1000/sec' option family 'ipv6' option target 'ACCEPT' config rule option name 'Allow-ICMPv6-Forward' option src 'wan' option dest '*' option proto 'icmp' list icmp_type 'echo-request' list icmp_type 'echo-reply' list icmp_type 'destination-unreachable' list icmp_type 'packet-too-big' list icmp_type 'time-exceeded' list icmp_type 'bad-header' list icmp_type 'unknown-header-type' option limit '1000/sec' option family 'ipv6' option target 'ACCEPT' config include option path '/etc/firewall.user' config include option path '/usr/share/firewall/turris' config redirect option target 'SNAT' option src 'lan' option dest 'wan' option proto 'all' option src_dip '123.123.123.241' option name 'Lokalni'
/etc/config/network config interface 'lan' option ifname 'eth1' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option ip6assign '60' option ipaddr '192.168.88.1' config interface 'publiclan' option ifname 'eth1' #option type 'bridge' option proto 'static' option ipaddr '123.123.123.241' option netmask '255.255.255.248' option ip6assign '60' /etc/config/dhcp config dhcp 'lan' option interface 'lan' option start '100' option leasetime '12h' option ignore '0' option limit '200' list dhcp_option '6,192.168.88.1' config dhcp 'publiclan' option interface 'publiclan' option start '242' option limit '246' option leasetime '12h' option ignore '0' list dhcp_option '6,123.123.123.241' /etc/config/firewall config redirect option target 'SNAT' option src 'lan' option dest 'wan' option proto 'all' option src_dip '123.123.123.247' option name 'Lokalni'
/etc/config/network config interface 'lan' option ifname 'eth1' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option ip6assign '60' option ipaddr '192.168.88.1' config interface 'publiclan' option ifname 'eth0' #option type 'bridge' option proto 'static' option ipaddr '123.123.123.241' option netmask '255.255.255.248' option ip6assign '60' config interface 'wan' option ifname 'eth2' option proto 'static' option ipaddr '10.99.99.2' option netmask '255.255.255.0' option gateway '10.99.99.1' option dns '217.170.96.24 217.170.96.2' config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option ports '0 1 2 3 4 ' config switch_vlan option device 'switch0' option vlan '2' option ports '5 6' /etc/config/dhcp config dhcp 'lan' option interface 'lan' option start '100' option leasetime '12h' option ignore '0' option limit '200' list dhcp_option '6,192.168.88.1' config dhcp 'publiclan' option interface 'publiclan' option start '242' option limit '246' option leasetime '12h' option ignore '0' list dhcp_option '6,123.123.123.241' /etc/config/firewall config redirect option target 'SNAT' option src 'lan' option dest 'wan' option proto 'all' option src_dip '123.123.123.247' option name 'Lokalni'
IP konfigurace Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Intel(R) 82579LM Gigabit Network Connection Physical Address. . . . . . . . . : D4-C9-EF-E9-35-79 DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fe80::d8b0:fff7:5670:e9bf%3(Preferred) IPv4 Address. . . . . . . . . . . : 123.123.123.243(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.255.248 Lease Obtained. . . . . . . . . . : 14. května 2014 16:07:44 Lease Expires . . . . . . . . . . : 15. května 2014 4:12:08 Default Gateway . . . . . . . . . : 123.123.123.241 DHCP Server . . . . . . . . . . . : 123.123.123.241 DHCPv6 IAID . . . . . . . . . . . : 64276975 DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-19-CC-CD-74-D4-C9-EF-E9-35-79 DNS Servers . . . . . . . . . . . : 123.123.123.241 NetBIOS over Tcpip. . . . . . . . : Enabled ping seznam.cz Pinging seznam.cz [77.75.72.3] with 32 bytes of data: Reply from 123.123.123.241: Destination port unreachable. Reply from 123.123.123.241: Destination port unreachable. Reply from 123.123.123.241: Destination port unreachable. Reply from 123.123.123.241: Destination port unreachable. Ping statistics for 77.75.72.3: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), ping 77.75.76.3 Pinging 77.75.76.3 with 32 bytes of data: Reply from 123.123.123.241: Destination port unreachable. Reply from 123.123.123.241: Destination port unreachable. Ping statistics for 77.75.76.3: Packets: Sent = 2, Received = 2, Lost = 0 (0% loss),
/etc/config/dhcp config dhcp 'lan' option interface 'lan' option start '100' option leasetime '2m' option limit '200' list dhcp_option '6,192.168.88.1' config dhcp 'publiclan' option interface 'publiclan' option start '242' option limit '246' option leasetime '2m' list dhcp_option '6,178.17.92.241' option dynamicdhcp '0' config dhcp 'wan' option interface 'wan' option ignore '1' config host option name 'OfficeJet8000' option mac 'd4:85:64:80:a2:97' option ip '192.168.88.250' config host option mac '00:26:18:74:1e:ae' option ip '123.123.123.246' option name 'server' config host option name 'lukas-note' option mac 'd4:c9:ef:e9:35:79' option ip '123.123.123.242' /etc/config/network config interface 'lan' option type 'bridge' option proto 'static' option netmask '255.255.255.0' option ip6assign '60' option ipaddr '192.168.88.1' option _orig_ifname 'eth1 wlan0' option _orig_bridge 'true' option ifname 'eth1' config interface 'publiclan' option proto 'static' option ipaddr '123.123.123.241' option netmask '255.255.255.248' option ip6assign '60' option _orig_ifname 'eth0' option _orig_bridge 'true' option ifname 'eth0' config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option ports '0 1 2 3 4' option vid '1' config switch_vlan option device 'switch0' option vlan '2' option ports '5 6' option vid '2' /etc/config/firewall config redirect option target 'SNAT' option src 'lan' option dest 'wan' option proto 'all' option src_dip '123.123.123.242' option name 'mujnote' option src_ip '123.123.123.242' config redirect option target 'SNAT' option src 'lan' option dest 'wan' option proto 'all' option src_dip '123.123.123.246' option name 'server' option src_ip '123.123.123.246' config redirect option target 'SNAT' option src 'lan' option dest 'wan' option proto 'all' option src_dip '123.123.123.247' option name 'Lokalni'
config switch option name 'switch0' option reset '1' option enable_vlan '1' config switch_vlan option device 'switch0' option vlan '1' option ports '3 4 6' option vid '1' config switch_vlan option device 'switch0' option vlan '2' option ports '0 1 2 5' option vid '2'
Powered by mwForum 2.29.3 © 1999-2013 Markus Wichitill