3
3
3err02015-04-22 04:13:40
Squid
3err0, 2015-04-22 04:13:40

What rules to specify iptables in Zyxel router for port redirection?

There is a server with a configured SQUID, which is connected via a Zyxel GIGA 2 router with firmware version 1, which distributes the Internet to all computers connected to it on the 192.168.1.0/24 network. (Server 192.168.1.2)
Tell me what rules you need to specify in the iptables of the router so that it redirects requests coming to the 80 port of the router to the server port 3128. I
met a similar topic forum.zyxmon.org/topic183-prozrachno-filtratsiya-r... with an indication of the rules that I tried to somehow change, but nothing came of it.
I hope for your help.

/var/tmp # iptables -L -n -v
Chain INPUT (policy DROP 95 packets, 12068 bytes)
 pkts bytes target     prot opt in     out     source               destination         
  701  103K ACCEPT     all  --  br0    *       0.0.0.0/0            0.0.0.0/0           
    1    76 ACCEPT     all  --  ppp0   *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
    0     0 ACCEPT     2    --  ppp0   *       0.0.0.0/0            0.0.0.0/0           
    0     0 DROP       icmp --  ppp0   *       0.0.0.0/0            0.0.0.0/0           icmp type 8 
    0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0           icmp type 255 

Chain FORWARD (policy DROP 231 packets, 15245 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DROP       all  --  !br0   ppp0    0.0.0.0/0            0.0.0.0/0           
 1986  220K ACCEPT     all  --  ppp0   *       0.0.0.0/0            192.168.1.2         state NEW 
    0     0 ACCEPT     udp  --  ppp0   *       0.0.0.0/0            192.168.1.2         state NEW udp dpt:22 
    0     0 ACCEPT     tcp  --  ppp0   *       0.0.0.0/0            192.168.1.2         state NEW tcp dpt:22 
    0     0 ACCEPT     tcp  --  ppp0   *       0.0.0.0/0            192.168.1.2         state NEW tcp dpts:20:21 
    0     0 ACCEPT     udp  --  ppp0   *       0.0.0.0/0            192.168.1.2         state NEW udp dpt:443 
    0     0 ACCEPT     tcp  --  ppp0   *       0.0.0.0/0            192.168.1.2         state NEW tcp dpt:443 
    0     0 ACCEPT     tcp  --  ppp0   *       0.0.0.0/0            192.168.1.2         state NEW tcp dpt:80 
  949 69364 ACCEPT     all  --  br0    *       0.0.0.0/0            0.0.0.0/0           state NEW 
  148 29446 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED 
    0     0 MINIUPNPD  all  --  ppp0   !ppp0   0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT 871 packets, 298K bytes)
 pkts bytes target     prot opt in     out     source               destination         

Chain MINIUPNPD (1 references)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            192.168.1.3         tcp dpt:18476 
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.1.3         udp dpt:18476

Chain of Live Rules
br0       Link encap:Ethernet  HWaddr EC:43:F6:DB:9A:F8  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:72695 errors:0 dropped:0 overruns:0 frame:0
          TX packets:117712 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:17732340 (16.9 MiB)  TX bytes:31849490 (30.3 MiB)

eth2      Link encap:Ethernet  HWaddr EC:43:F6:DB:9A:F8  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:137568 errors:0 dropped:0 overruns:0 frame:0
          TX packets:119169 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:34894258 (33.2 MiB)  TX bytes:32904939 (31.3 MiB)
          Interrupt:22 

eth2.1    Link encap:Ethernet  HWaddr EC:43:F6:DB:9A:F8  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:72707 errors:0 dropped:0 overruns:0 frame:0
          TX packets:117711 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:17735540 (16.9 MiB)  TX bytes:31849400 (30.3 MiB)

eth2.2    Link encap:Ethernet  HWaddr EC:43:F6:DB:9A:F9  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:178872 errors:0 dropped:0 overruns:0 frame:0
          TX packets:56974 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:49841797 (47.5 MiB)  TX bytes:11412709 (10.8 MiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:91.206.19.162  P-t-P:172.30.0.30  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1400  Metric:1
          RX packets:167991 errors:0 dropped:0 overruns:0 frame:0
          TX packets:55838 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:49003375 (46.7 MiB)  TX bytes:10144028 (9.6 MiB)

ra0       Link encap:Ethernet  HWaddr EC:43:F6:DB:9A:F8  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2678 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2338 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:345071 (336.9 KiB)  TX bytes:580420 (566.8 KiB)
          Interrupt:25

Network interfaces

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Lebedev, 2015-04-22
@k3NGuru

Have you tried https://www.linux.org.ru/forum/admin/9215559?cid=9... ?
zyxel.ru/sites/default/download/Keenetic_Giga/cli_... page 101 here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question