26

(21 odpowiedzi, napisanych Oprogramowanie / Software)

Witaj Cezary
Dzięki za szybką odpowiedź , no tak z 192.168.2.1 jak wepnę się kablem to mam dostęp do 192.168.1.1
do ssh , zarządzanie ruterem itd...

27

(21 odpowiedzi, napisanych Oprogramowanie / Software)

Witam

Qos działa mam ustawione na poszczególne podsieci jak chciałem ale z firewall-em to poległem nadal nie potrafię odesparować
192.168.1.1 aby nie miała dostępu do 2.1 3.1 4.1 i na odwrót , chciałbym aby podsieci miały dostęp do internetu ale między sobą były zablokowane w całości.
poniżej wklejam konfigurację firewall-a

root@OpenWrt:~# uci show firewall
firewall.@defaults[0]=defaults
firewall.@defaults[0].syn_flood='1'
firewall.@defaults[0].input='ACCEPT'
firewall.@defaults[0].output='ACCEPT'
firewall.@defaults[0].forward='REJECT'
firewall.@zone[0]=zone
firewall.@zone[0].name='lan'
firewall.@zone[0].input='ACCEPT'
firewall.@zone[0].output='ACCEPT'
firewall.@zone[0].forward='ACCEPT'
firewall.@zone[0].network='lan'
firewall.@zone[1]=zone
firewall.@zone[1].name='wan'
firewall.@zone[1].input='REJECT'
firewall.@zone[1].output='ACCEPT'
firewall.@zone[1].forward='REJECT'
firewall.@zone[1].masq='1'
firewall.@zone[1].mtu_fix='1'
firewall.@zone[1].network='wan6 wan'
firewall.@forwarding[0]=forwarding
firewall.@forwarding[0].src='lan'
firewall.@forwarding[0].dest='wan'
firewall.@rule[0]=rule
firewall.@rule[0].name='Allow-DHCP-Renew'
firewall.@rule[0].src='wan'
firewall.@rule[0].proto='udp'
firewall.@rule[0].dest_port='68'
firewall.@rule[0].target='ACCEPT'
firewall.@rule[0].family='ipv4'
firewall.@rule[1]=rule
firewall.@rule[1].name='Allow-Ping'
firewall.@rule[1].src='wan'
firewall.@rule[1].proto='icmp'
firewall.@rule[1].icmp_type='echo-request'
firewall.@rule[1].family='ipv4'
firewall.@rule[1].target='ACCEPT'
firewall.@rule[2]=rule
firewall.@rule[2].name='Allow-IGMP'
firewall.@rule[2].src='wan'
firewall.@rule[2].proto='igmp'
firewall.@rule[2].family='ipv4'
firewall.@rule[2].target='ACCEPT'
firewall.@rule[3]=rule
firewall.@rule[3].name='Allow-DHCPv6'
firewall.@rule[3].src='wan'
firewall.@rule[3].proto='udp'
firewall.@rule[3].src_ip='fc00::/6'
firewall.@rule[3].dest_ip='fc00::/6'
firewall.@rule[3].dest_port='546'
firewall.@rule[3].family='ipv6'
firewall.@rule[3].target='ACCEPT'
firewall.@rule[4]=rule
firewall.@rule[4].name='Allow-MLD'
firewall.@rule[4].src='wan'
firewall.@rule[4].proto='icmp'
firewall.@rule[4].src_ip='fe80::/10'
firewall.@rule[4].icmp_type='130/0' '131/0' '132/0' '143/0'
firewall.@rule[4].family='ipv6'
firewall.@rule[4].target='ACCEPT'
firewall.@rule[5]=rule
firewall.@rule[5].name='Allow-ICMPv6-Input'
firewall.@rule[5].src='wan'
firewall.@rule[5].proto='icmp'
firewall.@rule[5].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type' 'router-solicitation' 'neighbour-solicitation' 'router-advertisement' 'neighbour-advertisement'
firewall.@rule[5].limit='1000/sec'
firewall.@rule[5].family='ipv6'
firewall.@rule[5].target='ACCEPT'
firewall.@rule[6]=rule
firewall.@rule[6].name='Allow-ICMPv6-Forward'
firewall.@rule[6].src='wan'
firewall.@rule[6].dest='*'
firewall.@rule[6].proto='icmp'
firewall.@rule[6].icmp_type='echo-request' 'echo-reply' 'destination-unreachable' 'packet-too-big' 'time-exceeded' 'bad-header' 'unknown-header-type'
firewall.@rule[6].limit='1000/sec'
firewall.@rule[6].family='ipv6'
firewall.@rule[6].target='ACCEPT'
firewall.@include[0]=include
firewall.@include[0].path='/etc/firewall.user'
firewall.@rule[7]=rule
firewall.@rule[7].src='wan'
firewall.@rule[7].dest='lan'
firewall.@rule[7].proto='esp'
firewall.@rule[7].target='ACCEPT'
firewall.@rule[8]=rule
firewall.@rule[8].src='wan'
firewall.@rule[8].dest='lan'
firewall.@rule[8].dest_port='500'
firewall.@rule[8].proto='udp'
firewall.@rule[8].target='ACCEPT'
firewall.@redirect[0]=redirect
firewall.@redirect[0].target='DNAT'
firewall.@redirect[0].src='wan'
firewall.@redirect[0].dest='lan'
firewall.@redirect[0].proto='tcp udp'
firewall.@redirect[0].src_dport='37777'
firewall.@redirect[0].dest_ip='192.168.1.71'
firewall.@redirect[0].dest_port='37777'
firewall.@redirect[0].name='dvr'
firewall.@redirect[1]=redirect
firewall.@redirect[1].target='DNAT'
firewall.@redirect[1].src='wan'
firewall.@redirect[1].dest='lan'
firewall.@redirect[1].proto='tcp udp'
firewall.@redirect[1].src_dport='37778'
firewall.@redirect[1].dest_ip='192.168.1.71'
firewall.@redirect[1].dest_port='37778'
firewall.@redirect[1].name='dvr2'
firewall.@zone[2]=zone
firewall.@zone[2].name='lan2'
firewall.@zone[2].network='lan2'
firewall.@zone[2].input='ACCEPT'
firewall.@zone[2].output='ACCEPT'
firewall.@zone[2].forward='REJECT'
firewall.@forwarding[1]=forwarding
firewall.@forwarding[1].src='lan2'
firewall.@forwarding[1].dest='wan'
firewall.@zone[3]=zone
firewall.@zone[3].name='lan3'
firewall.@zone[3].network='lan3'
firewall.@zone[3].input='ACCEPT'
firewall.@zone[3].output='ACCEPT'
firewall.@zone[3].forward='REJECT'
firewall.@forwarding[2]=forwarding
firewall.@forwarding[2].src='lan3'
firewall.@forwarding[2].dest='wan'
firewall.@zone[4]=zone
firewall.@zone[4].name='lan4'
firewall.@zone[4].network='lan4'
firewall.@zone[4].input='ACCEPT'
firewall.@zone[4].output='ACCEPT'
firewall.@zone[4].forward='REJECT'
firewall.@forwarding[3]=forwarding
firewall.@forwarding[3].src='lan4'
firewall.@forwarding[3].dest='wan'

Dziekuję za pomoc

28

(21 odpowiedzi, napisanych Oprogramowanie / Software)

Chyba odpocznę na dziś sad na chwile obecnie w Firewall wykonałem tylko reguły , które podałeś wyżej.

29

(21 odpowiedzi, napisanych Oprogramowanie / Software)

Cezary dziekuję działa ok tylko nadal mam dostęp do 192.168.1.1 z 2.1 , 3.1 4.1 , teraz mam nowe interfejsy wiec w qos będzie mozliwośc ustawień

30

(21 odpowiedzi, napisanych Oprogramowanie / Software)

root@OpenWrt:~# swconfig dev switch0 help
switch0: ag71xx-mdio.0(Atheros AR8327), ports: 7 (cpu @ 0), vlans: 128
     --switch
        Attribute 1 (int): enable_vlan (Enable VLAN mode)
        Attribute 2 (none): reset_mibs (Reset all MIB counters)
        Attribute 3 (int): enable_mirror_rx (Enable mirroring of RX packets)
        Attribute 4 (int): enable_mirror_tx (Enable mirroring of TX packets)
        Attribute 5 (int): mirror_monitor_port (Mirror monitor port)
        Attribute 6 (int): mirror_source_port (Mirror source port)
        Attribute 7 (int): arl_age_time (ARL age time (secs))
        Attribute 8 (string): arl_table (Get ARL table)
        Attribute 9 (none): flush_arl_table (Flush ARL table)
        Attribute 10 (int): igmp_snooping (Enable IGMP Snooping)
        Attribute 11 (int): igmp_v3 (Enable IGMPv3 support)
        Attribute 12 (none): apply (Activate changes in the hardware)
        Attribute 13 (none): reset (Reset the switch)
     --vlan
        Attribute 1 (int): vid (VLAN ID (0-4094))
        Attribute 2 (ports): ports (VLAN port mapping)
     --port
        Attribute 1 (none): reset_mib (Reset single port MIB counters)
        Attribute 2 (string): mib (Get port's MIB counters)
        Attribute 3 (int): enable_eee (Enable EEE PHY sleep mode)
        Attribute 4 (none): flush_arl_table (Flush port's ARL table entries)
        Attribute 5 (int): igmp_snooping (Enable port's IGMP Snooping)
        Attribute 6 (int): pvid (Primary VLAN ID)
        Attribute 7 (unknown): link (Get port link information)

Na chwile obecna wydzieliłem dwa porty działa DHCP adresacja sieci domowej 192.168.1.1 i gueast network 172.16.0.1
mimo iz sa to inne klasy adresowe nadal z sieci 172.16.0.1 mam dostęp do 192.168.1.1

staram się tez zrozumieć qos.....

teraz network wygląda następująco..

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 'fdaf:fd46:bc28::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'
        option delegate '0'

config interface 'guest'
        option proto 'static'
        option ifname 'eth0.3'
        option ipaddr '172.16.0.1'
        option netmask '255.240.0.0'
        option type 'bridge'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 3 4'

Troszkę pomogło mi zrozumieć działanie to objasnienie a w zasadzie grafika;

https://wiki.openwrt.org/_media/media/tplink/tl-wr1043/tl-wr1043nd-v2_schematics.png

31

(21 odpowiedzi, napisanych Oprogramowanie / Software)

Dziękuję Cezary za szybką odpowiedź

Wykorzystałem przykład z opisu linka , którego podesłałeś , niestety wykrzaczyła mi się cała sieć (wczesniej zapisałem sobie ustawienia i udało mi się je przez WiFi przywrócić) na przełączniku żaden port nie obsługiwał DHCP.

moje ustawienia w interface są takie:

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 'fdaf:fd46:bc28::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'
        option delegate '0'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 0'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6'

swconfig

root@OpenWrt:~# swconfig list
Found: switch0 - ag71xx-mdio.0

Wykorzystałem przykład : Wydzielenie portów ethernetowych dla innej sieci
i ten aspekt opisuje praktycznie to co chcę zrobić brakuje jeszcze kontroli pasma....

Dziekuję za odpowiedź

32

(21 odpowiedzi, napisanych Oprogramowanie / Software)

Dzień dobry

Już dwa razy musiałem od nowa wgrywać oprogramowanie , chciałbym uzyskać pewną funkcjonalność ale moje podstawy w Linux sa mizerne coś robię ale nie wiem do końca co bo nie rozumię sad znalazłem w sieci kilka opisów ale albo dotyczą połowicznie tego co chę osiągnąć lub sa na inny temat.


a więc do rzeczy:

Chciałbym wykorzystac 3 porty LAN i utworzyć na nich odseparowane sięci od głównej domowej 1.1 np
Lan 2 :192.168.2.1
Lan 3 :192.168.3.1
Lan 4 :192.168.4.1

Miały by one miec dostęp do internetu i najlepiej z opcją kontroli wykorzystania pasma aby ustawić limity przepustowości.

Dziekuję za wszelkie sugestie.


Pozdrawiam