У меня статик айпи через pptp с рутером. Я хочу чтоб при нажатии на ссылку http://мой_статик_IP:8000 переходило на мой сервер. Если роутер выкинуть и шнур подсоединить напрямую к компу - то все работает.
/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 'REJECT'
config zone
option name 'wan'
list network 'wan'
list network 'wan6'
option input 'REJECT'
option output 'ACCEPT'
option masq '1'
option mtu_fix '1'
option forward 'ACCEPT'
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 src 'lan'
option proto 'tcp'
option dest_port '9100'
option target 'ACCEPT'
config include 'miniupnpd'
option type 'script'
option path '/usr/share/miniupnpd/firewall.include'
option family 'any'
option reload '1'
config rule
option src 'wan'
option proto 'tcp'
option dest_port '8000'
option target 'ACCEPT'
config redirect
option target 'DNAT'
option src 'wan'
option dest 'lan'
option dest_ip '192.168.1.100'
option name '8000'
option proto 'tcpudp'
option src_dport '8000'
option dest_port '8000'
/etc/ppp/ip-up.d/ip-up
iptables -A forwarding_rule -o $1 -j ACCEPT
iptables -A forwarding_rule -i $1 -j ACCEPT
iptables -t nat -A postrouting_rule -o $1 -j MASQUERADE
iptables -t mangle -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
ip route add 172.25.1.0/24 via 172.25.25.1
Chain PREROUTING (policy ACCEPT 1640 packets, 118K bytes)
pkts bytes target prot opt in out source destination
2732 197K delegate_prerouting all -- * * 0.0.0.0/0 0.0.0.0/0
Chain INPUT (policy ACCEPT 1394 packets, 93861 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 2931 packets, 196K bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
4510 310K delegate_postrouting all -- * * 0.0.0.0/0 0.0.0.0/0
Chain MINIUPNPD (0 references)
pkts bytes target prot opt in out source destination
0 0 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:5709 to:192.168.1.100:5709
0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:5709 to:192.168.1.100:5709
Chain delegate_postrouting (1 references)
pkts bytes target prot opt in out source destination
4510 310K postrouting_rule all -- * * 0.0.0.0/0 0.0.0.0/0 /* user chain for postrouting */
2 468 zone_lan_postrouting all -- * br-lan 0.0.0.0/0 0.0.0.0/0
3602 241K zone_wan_postrouting all -- * eth0.2 0.0.0.0/0 0.0.0.0/0
Chain delegate_prerouting (1 references)
pkts bytes target prot opt in out source destination
2732 197K prerouting_rule all -- * * 0.0.0.0/0 0.0.0.0/0 /* user chain for prerouting */
506 43245 zone_lan_prerouting all -- br-lan * 0.0.0.0/0 0.0.0.0/0
172 15782 zone_wan_prerouting all -- eth0.2 * 0.0.0.0/0 0.0.0.0/0
Chain postrouting_lan_rule (1 references)
pkts bytes target prot opt in out source destination
Chain postrouting_rule (1 references)
pkts bytes target prot opt in out source destination
979 73679 MASQUERADE all -- * pptp-vpn 0.0.0.0/0 0.0.0.0/0
Chain postrouting_wan_rule (1 references)
pkts bytes target prot opt in out source destination
Chain prerouting_lan_rule (1 references)
pkts bytes target prot opt in out source destination
Chain prerouting_rule (1 references)
pkts bytes target prot opt in out source destination
Chain prerouting_wan_rule (1 references)
pkts bytes target prot opt in out source destination
Chain zone_lan_postrouting (1 references)
pkts bytes target prot opt in out source destination
2 468 postrouting_lan_rule all -- * * 0.0.0.0/0 0.0.0.0/0 /* user chain for postrouting */
0 0 SNAT tcp -- * * 192.168.1.0/24 192.168.1.100 tcp dpt:8000 /* 80 (reflection) */ to:192.168.1.1
0 0 SNAT udp -- * * 192.168.1.0/24 192.168.1.100 udp dpt:8000 /* 80 (reflection) */ to:192.168.1.1
Chain zone_lan_prerouting (1 references)
pkts bytes target prot opt in out source destination
506 43245 prerouting_lan_rule all -- * * 0.0.0.0/0 0.0.0.0/0 /* user chain for prerouting */
0 0 DNAT tcp -- * * 192.168.1.0/24 172.25.25.80 tcp dpt:8000 /* 80 (reflection) */ to:192.168.1.100:8000
0 0 DNAT udp -- * * 192.168.1.0/24 172.25.25.80 udp dpt:8000 /* 80 (reflection) */ to:192.168.1.100:8000
Chain zone_wan_postrouting (1 references)
pkts bytes target prot opt in out source destination
3602 241K postrouting_wan_rule all -- * * 0.0.0.0/0 0.0.0.0/0 /* user chain for postrouting */
3602 241K MASQUERADE all -- * * 0.0.0.0/0 0.0.0.0/0
Chain zone_wan_prerouting (1 references)
pkts bytes target prot opt in out source destination
172 15782 prerouting_wan_rule all -- * * 0.0.0.0/0 0.0.0.0/0 /* user chain for prerouting */
0 0 DNAT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8000 /* 80 */ to:192.168.1.100:8000
0 0 DNAT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:8000 /* 80 */ to:192.168.1.100:8000