Статус:
Offline
Реєстрація: 09.04.2006
Повідом.: 824
Реєстрація: 09.04.2006
Повідом.: 824
- 🟡 09:22 Відбій тривоги в Харківська область.Зверніть увагу, тривога ще триває у:- Куп’янський район- Харківський район- Липецька територіальна громада- Вовчанська територіальна громада#Харківська_область
- #1
Проблемы с Port Forwarding Help!!!
Проблема с пробросом портов, описываю:
Интернет через PPTP (VPN) поверх LAN, модем DIR-320 на нем стоит OpenWrt, конфиги хранятся в файле etc/firewall.user
WAN wan (eht0.1)
WAN (VPN) wan1 (ppp0)
LAN lan (br-lan)
Хочу сделать чтобы при коннекте на внешний IP:3389 соиденение перебрасывалось на комп в локальной сети 192.168.1.200:3389
Правлю etc/firewall.user:
перезапускаю фаервол, эффекта ноль, нет конекта.
Так:
тоже не работает
Если конектится на 192.168.1.200:3389 то все ок, но если ВНЕШНИЙ_IP:3389 то не проходит
Помогите настроить...
Проблема с пробросом портов, описываю:
Интернет через PPTP (VPN) поверх LAN, модем DIR-320 на нем стоит OpenWrt, конфиги хранятся в файле etc/firewall.user
WAN wan (eht0.1)
WAN (VPN) wan1 (ppp0)
LAN lan (br-lan)
Хочу сделать чтобы при коннекте на внешний IP:3389 соиденение перебрасывалось на комп в локальной сети 192.168.1.200:3389
Правлю etc/firewall.user:
Код:
iptables -t nat -i ppp0 -I PREROUTING -p tcp --dport 3389 -j DNAT --to 192.168.1.200:3389
iptables -I FORWARD -p tcp -d 192.168.1.200 --dport 3389 -j ACCEPT
Так:
Код:
iptables -t nat -A prerouting_wan1 -p udp --dport 3389 -j DNAT --to 192.168.1.200:3389
iptables -A forwarding_wan -p udp1 --dport 3389 -d 192.168.1.200 -j ACCEPT
Если конектится на 192.168.1.200:3389 то все ок, но если ВНЕШНИЙ_IP:3389 то не проходит
Код:
Iptables status
Target Filter
Chain INPUT (policy ACCEPT 444 packets, 26040 bytes)
num pkts bytes target prot opt in out source destination options
1 805K 212M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
3 28332 1400K syn_flood tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02
4 62045 3682K input_rule all -- * * 0.0.0.0/0 0.0.0.0/0
5 62039 3681K input all -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy DROP 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination options
1 1968K 1351M zone_wimax_MSSFIX all -- * * 0.0.0.0/0 0.0.0.0/0
2 1969K 1351M zone_wan1_MSSFIX all -- * * 0.0.0.0/0 0.0.0.0/0
3 1969K 1351M zone_wan_MSSFIX all -- * * 0.0.0.0/0 0.0.0.0/0
4 1930K 1349M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
5 40329 2760K forwarding_rule all -- * * 0.0.0.0/0 0.0.0.0/0
6 40329 2760K forward all -- * * 0.0.0.0/0 0.0.0.0/0
7 261 18227 reject all -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination options
1 1436K 1233M ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 0 0 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
3 65 3995 output_rule all -- * * 0.0.0.0/0 0.0.0.0/0
4 65 3995 output all -- * * 0.0.0.0/0 0.0.0.0/0
Chain forward (1 references)
num pkts bytes target prot opt in out source destination options
1 40057 2742K zone_lan_forward all -- br-lan * 0.0.0.0/0 0.0.0.0/0
2 3 195 zone_wan_forward all -- eth0.1 * 0.0.0.0/0 0.0.0.0/0
3 0 0 zone_wan1_forward all -- ppp0 * 0.0.0.0/0 0.0.0.0/0
Chain forwarding_lan (1 references)
num pkts bytes target prot opt in out source destination options
Chain forwarding_rule (1 references)
num pkts bytes target prot opt in out source destination options
Chain forwarding_wan (1 references)
num pkts bytes target prot opt in out source destination options
Chain forwarding_wan1 (1 references)
num pkts bytes target prot opt in out source destination options
Chain forwarding_wimax (1 references)
num pkts bytes target prot opt in out source destination options
Chain input (1 references)
num pkts bytes target prot opt in out source destination options
1 553 46478 zone_lan all -- br-lan * 0.0.0.0/0 0.0.0.0/0
2 752 71642 zone_wan all -- eth0.1 * 0.0.0.0/0 0.0.0.0/0
3 60299 3538K zone_wan1 all -- ppp0 * 0.0.0.0/0 0.0.0.0/0
Chain input_lan (1 references)
num pkts bytes target prot opt in out source destination options
Chain input_rule (1 references)
num pkts bytes target prot opt in out source destination options
Chain input_wan (1 references)
num pkts bytes target prot opt in out source destination options
Chain input_wan1 (1 references)
num pkts bytes target prot opt in out source destination options
Chain input_wimax (1 references)
num pkts bytes target prot opt in out source destination options
Chain output (1 references)
num pkts bytes target prot opt in out source destination options
1 65 3995 zone_lan_ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
2 65 3995 zone_wan_ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
3 65 3995 zone_wan1_ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
4 0 0 zone_wimax_ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain output_rule (1 references)
num pkts bytes target prot opt in out source destination options
Chain reject (7 references)
num pkts bytes target prot opt in out source destination options
1 28359 1399K REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 reject-with tcp-reset
2 32933 2225K REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Chain syn_flood (1 references)
num pkts bytes target prot opt in out source destination options
1 28332 1400K RETURN tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 limit: avg 25/sec burst 50
2 0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_lan (1 references)
num pkts bytes target prot opt in out source destination options
1 553 46478 input_lan all -- * * 0.0.0.0/0 0.0.0.0/0
2 553 46478 zone_lan_ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_lan_ACCEPT (3 references)
num pkts bytes target prot opt in out source destination options
1 40610 2788K ACCEPT all -- br-lan * 0.0.0.0/0 0.0.0.0/0
2 0 0 ACCEPT all -- * br-lan 0.0.0.0/0 0.0.0.0/0
Chain zone_lan_DROP (0 references)
num pkts bytes target prot opt in out source destination options
1 0 0 DROP all -- br-lan * 0.0.0.0/0 0.0.0.0/0
2 0 0 DROP all -- * br-lan 0.0.0.0/0 0.0.0.0/0
Chain zone_lan_MSSFIX (0 references)
num pkts bytes target prot opt in out source destination options
1 0 0 TCPMSS tcp -- * br-lan 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
Chain zone_lan_REJECT (1 references)
num pkts bytes target prot opt in out source destination options
1 0 0 reject all -- br-lan * 0.0.0.0/0 0.0.0.0/0
2 0 0 reject all -- * br-lan 0.0.0.0/0 0.0.0.0/0
Chain zone_lan_forward (1 references)
num pkts bytes target prot opt in out source destination options
1 40057 2742K zone_lan_ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
2 0 0 zone_wan1_ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
3 0 0 zone_wan_ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0
4 0 0 forwarding_lan all -- * * 0.0.0.0/0 0.0.0.0/0
5 0 0 zone_lan_REJECT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_wan (1 references)
num pkts bytes target prot opt in out source destination options
1 752 71642 input_wan all -- * * 0.0.0.0/0 0.0.0.0/0
2 7 2620 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:68
3 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
4 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:89
5 745 69022 zone_wan_REJECT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_wan1 (1 references)
num pkts bytes target prot opt in out source destination options
1 60299 3538K input_wan1 all -- * * 0.0.0.0/0 0.0.0.0/0
2 60299 3538K zone_wan1_REJECT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_wan1_ACCEPT (2 references)
num pkts bytes target prot opt in out source destination options
1 0 0 ACCEPT all -- ppp0 * 0.0.0.0/0 0.0.0.0/0
2 65 3995 ACCEPT all -- * ppp0 0.0.0.0/0 0.0.0.0/0
Chain zone_wan1_DROP (0 references)
num pkts bytes target prot opt in out source destination options
1 0 0 DROP all -- ppp0 * 0.0.0.0/0 0.0.0.0/0
2 0 0 DROP all -- * ppp0 0.0.0.0/0 0.0.0.0/0
Chain zone_wan1_MSSFIX (1 references)
num pkts bytes target prot opt in out source destination options
1 20607 1083K TCPMSS tcp -- * ppp0 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
Chain zone_wan1_REJECT (2 references)
num pkts bytes target prot opt in out source destination options
1 60286 3537K reject all -- ppp0 * 0.0.0.0/0 0.0.0.0/0
2 0 0 reject all -- * ppp0 0.0.0.0/0 0.0.0.0/0
Chain zone_wan1_forward (1 references)
num pkts bytes target prot opt in out source destination options
1 0 0 forwarding_wan1 all -- * * 0.0.0.0/0 0.0.0.0/0
2 0 0 zone_wan1_REJECT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_wan_ACCEPT (2 references)
num pkts bytes target prot opt in out source destination options
1 0 0 ACCEPT all -- eth0.1 * 0.0.0.0/0 0.0.0.0/0
2 0 0 ACCEPT all -- * eth0.1 0.0.0.0/0 0.0.0.0/0
Chain zone_wan_DROP (0 references)
num pkts bytes target prot opt in out source destination options
1 0 0 DROP all -- eth0.1 * 0.0.0.0/0 0.0.0.0/0
2 0 0 DROP all -- * eth0.1 0.0.0.0/0 0.0.0.0/0
Chain zone_wan_MSSFIX (1 references)
num pkts bytes target prot opt in out source destination options
1 220 11932 TCPMSS tcp -- * eth0.1 0.0.0.0/0 0.0.0.0/0 tcp flags:0x06/0x02 TCPMSS clamp to PMTU
Chain zone_wan_REJECT (2 references)
num pkts bytes target prot opt in out source destination options
1 745 69022 reject all -- eth0.1 * 0.0.0.0/0 0.0.0.0/0
2 0 0 reject all -- * eth0.1 0.0.0.0/0 0.0.0.0/0
Chain zone_wan_forward (1 references)
num pkts bytes target prot opt in out source destination options
1 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.200 tcp dpt:89
2 0 0 ACCEPT udp -- * * 0.0.0.0/0 192.168.1.18 udp dpt:17801
3 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.18 tcp dpt:17801
4 0 0 ACCEPT udp -- * * 0.0.0.0/0 192.168.1.200 udp dpt:9802
5 0 0 ACCEPT udp -- * * 0.0.0.0/0 192.168.1.200 udp dpt:9801
6 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.200 tcp dpt:5302
7 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.200 tcp dpt:5301
8 0 0 ACCEPT udp -- * * 0.0.0.0/0 192.168.1.200 udp dpt:17800
9 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.200 tcp dpt:17800
10 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.254 tcp dpt:9896
11 0 0 ACCEPT udp -- * * 0.0.0.0/0 192.168.1.254 udp dpt:9895
12 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.254 tcp dpt:5325
13 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.254 tcp dpt:5324
14 1 95 ACCEPT udp -- * * 0.0.0.0/0 192.168.1.254 udp dpt:17843
15 2 100 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.254 tcp dpt:17843
16 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.66 tcp dpt:9894
17 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.66 tcp dpt:9893
18 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.66 tcp dpt:5315
19 0 0 ACCEPT udp -- * * 0.0.0.0/0 192.168.1.66 udp dpt:17842
20 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.66 tcp dpt:17842
21 0 0 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.66 tcp dpt:5314
22 0 0 forwarding_wan all -- * * 0.0.0.0/0 0.0.0.0/0
23 0 0 zone_wan_REJECT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_wimax (0 references)
num pkts bytes target prot opt in out source destination options
1 0 0 input_wimax all -- * * 0.0.0.0/0 0.0.0.0/0
2 0 0 zone_wimax_REJECT all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_wimax_ACCEPT (1 references)
num pkts bytes target prot opt in out source destination options
Chain zone_wimax_DROP (0 references)
num pkts bytes target prot opt in out source destination options
Chain zone_wimax_MSSFIX (1 references)
num pkts bytes target prot opt in out source destination options
Chain zone_wimax_REJECT (2 references)
num pkts bytes target prot opt in out source destination options
Chain zone_wimax_forward (0 references)
num pkts bytes target prot opt in out source destination options
1 0 0 forwarding_wimax all -- * * 0.0.0.0/0 0.0.0.0/0
2 0 0 zone_wimax_REJECT all -- * * 0.0.0.0/0 0.0.0.0/0
Target NAT
Chain PREROUTING (policy ACCEPT 385K packets, 27M bytes)
num pkts bytes target prot opt in out source destination options
1 59847 3515K zone_wan1_prerouting all -- ppp0 * 0.0.0.0/0 0.0.0.0/0
2 2178 274K zone_wan_prerouting all -- eth0.1 * 0.0.0.0/0 0.0.0.0/0
3 22851 2247K zone_lan_prerouting all -- br-lan * 0.0.0.0/0 0.0.0.0/0
4 85463 6075K prerouting_rule all -- * * 0.0.0.0/0 0.0.0.0/0
5 0 0 DNAT tcp -- ppp0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:3389 to:192.168.1.200
6 0 0 DNAT udp -- ppp0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:3389 to:192.168.1.200
Chain POSTROUTING (policy ACCEPT 1688 packets, 90163 bytes)
num pkts bytes target prot opt in out source destination options
1 48268 2732K postrouting_rule all -- * * 0.0.0.0/0 0.0.0.0/0
2 48253 2731K zone_wan_nat all -- * * 0.0.0.0/0 0.0.0.0/0
3 48116 2724K zone_wan1_nat all -- * * 0.0.0.0/0 0.0.0.0/0
4 151 9449 zone_wimax_nat all -- * * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 1193 packets, 78488 bytes)
num pkts bytes target prot opt in out source destination options
Chain postrouting_rule (1 references)
num pkts bytes target prot opt in out source destination options
Chain prerouting_lan (1 references)
num pkts bytes target prot opt in out source destination options
Chain prerouting_rule (1 references)
num pkts bytes target prot opt in out source destination options
Chain prerouting_wan (1 references)
num pkts bytes target prot opt in out source destination options
Chain prerouting_wan1 (1 references)
num pkts bytes target prot opt in out source destination options
Chain prerouting_wimax (1 references)
num pkts bytes target prot opt in out source destination options
Chain zone_lan_nat (0 references)
num pkts bytes target prot opt in out source destination options
1 0 0 MASQUERADE all -- * br-lan 0.0.0.0/0 0.0.0.0/0
Chain zone_lan_prerouting (1 references)
num pkts bytes target prot opt in out source destination options
1 22851 2247K prerouting_lan all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_wan1_nat (1 references)
num pkts bytes target prot opt in out source destination options
1 47947 2714K MASQUERADE all -- * ppp0 0.0.0.0/0 0.0.0.0/0
Chain zone_wan1_prerouting (1 references)
num pkts bytes target prot opt in out source destination options
1 59847 3515K prerouting_wan1 all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_wan_nat (1 references)
num pkts bytes target prot opt in out source destination options
1 124 6860 MASQUERADE all -- * eth0.1 0.0.0.0/0 0.0.0.0/0
Chain zone_wan_prerouting (1 references)
num pkts bytes target prot opt in out source destination options
1 2178 274K prerouting_wan all -- * * 0.0.0.0/0 0.0.0.0/0
2 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5314 to:192.168.1.66:5314
3 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:17842 to:192.168.1.66:17842
4 0 0 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:17842 to:192.168.1.66:17842
5 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5315 to:192.168.1.66:5315
6 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:9893 to:192.168.1.66:9893
7 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:9894 to:192.168.1.66:9894
8 2 100 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:17843 to:192.168.1.254:17843
9 1 95 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:17843 to:192.168.1.254:17843
10 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5324 to:192.168.1.254:5324
11 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5325 to:192.168.1.254:5325
12 0 0 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:9895 to:192.168.1.254:9895
13 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:9896 to:192.168.1.254:9896
14 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:17800 to:192.168.1.200:17800
15 0 0 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:17800 to:192.168.1.200:17800
16 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5301 to:192.168.1.200:5301
17 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5302 to:192.168.1.200:5302
18 0 0 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:9801 to:192.168.1.200:9801
19 0 0 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:9802 to:192.168.1.200:9802
20 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:17801 to:192.168.1.18:17801
21 0 0 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:17801 to:192.168.1.18:17801
22 0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:89 to:192.168.1.200:89
Chain zone_wimax_nat (1 references)
num pkts bytes target prot opt in out source destination options
Chain zone_wimax_prerouting (0 references)
num pkts bytes target prot opt in out source destination options
1 0 0 prerouting_wimax all -- * * 0.0.0.0/0 0.0.0.0/0
Target Mangle
Chain PREROUTING (policy ACCEPT 20M packets, 15G bytes)
num pkts bytes target prot opt in out source destination options
Chain INPUT (policy ACCEPT 7316K packets, 5542M bytes)
num pkts bytes target prot opt in out source destination options
Chain FORWARD (policy ACCEPT 13M packets, 9679M bytes)
num pkts bytes target prot opt in out source destination options
Chain OUTPUT (policy ACCEPT 6952K packets, 4574M bytes)
num pkts bytes target prot opt in out source destination options
Chain POSTROUTING (policy ACCEPT 20M packets, 14G bytes)
num pkts bytes target prot opt in out source destination options
Target Raw
Chain PREROUTING (policy ACCEPT 20M packets, 15G bytes)
num pkts bytes target prot opt in out source destination options
1 714K 180M zone_wan1_notrack all -- ppp0 * 0.0.0.0/0 0.0.0.0/0
2 804K 211M zone_wan_notrack all -- eth0.1 * 0.0.0.0/0 0.0.0.0/0
3 1316K 1174M zone_lan_notrack all -- br-lan * 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 6952K packets, 4574M bytes)
num pkts bytes target prot opt in out source destination options
Chain zone_lan_notrack (1 references)
num pkts bytes target prot opt in out source destination options
Chain zone_wan1_notrack (1 references)
num pkts bytes target prot opt in out source destination options
Chain zone_wan_notrack (1 references)
num pkts bytes target prot opt in out source destination options
Chain zone_wimax_notrack (0 references)
num pkts bytes target prot opt in out source destination options
Помогите настроить...