H
H
Hiks2014-07-22 10:17:34
iptables
Hiks, 2014-07-22 10:17:34

DD-WRT iptables how to make two local subnets?

There is a router with DD-WRT. (ip 192.168.100.1). The second subnet with ip 192.168.120.1 is configured on the router.
ifconfig:

br0       Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          inet addr:192.168.100.1  Bcast:192.168.100.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  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:3 (3.0 B)  TX bytes:0 (0.0 B)

br0:0     Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          inet addr:169.254.255.1  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

br0:3     Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          inet addr:192.168.120.1  Bcast:192.168.120.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0      Link encap:Ethernet  HWaddr 00:11:22:33:44:55
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3419 errors:0 dropped:0 overruns:0 frame:0
          TX packets:3318 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:559503 (546.3 KiB)  TX bytes:1513031 (1.4 MiB)

eth1      Link encap:Ethernet  HWaddr 00:11:22:33:44:66
          UP BROADCAST MULTICAST  MTU:1500  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:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
          RX packets:6 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:348 (348.0 B)  TX bytes:348 (348.0 B)

There is a device (ip 192.168.120.20) with a web interface. It is necessary to write an iptables rule that would allow, when accessing the router from the local network at 192.168.100.1 in the web interface with port 8080, to forward to 192.168.120.20:80.
For example, a PC has ip 192.168.100.15 received via dhcp. I go to 192.168.100.1 on the web and get into the router settings, and I go to 192.168.100.1:8080 and get to 192.168.120.20:80.
If you go to the router via shh and ping 192.168.120.20, then the ping passes.
So the question is how to make such access?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vetash, 2014-10-30
@vetash

So it's elementary - you create a forwarding through the web interface. NAT/QOS -> Port Forwarding

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question