Seveas
04-06-2004, 17:02
I've read other posts about my problem, but have not yet found a solution. So here is mine:
When I forward a port to a local IP-address, say port 21, the forwarding works from the outside. But i cannot use the external ip-adress from the inside.
Example:
ISP IP-address: 213.73.236.154
IP of server: 192.168.1.2
Random *external* IP: 146.50.9.20
146.50.9.20 -> 213.73.236.154 is forwarded correctly
192.168.1.* -> 213.73.236.154 is NOT forwarded. It gives me connection errors and port 80 shows the wl500g configuration page.
I am using Oleg's latest firmware and the router is in home gateway mode.
iptables -L -v -t nat says:
~ # iptables -L -v -t nat
Chain PREROUTING (policy ACCEPT 473 packets, 45986 bytes)
pkts bytes target prot opt in out source destination
0 0 REDIRECT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:8100 redir ports 80
0 0 REDIRECT tcp -- br0 any anywhere 213.73.236.154 tcp dpt:8100 redir ports 80
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:21 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpts:2000:2100 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:11900 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:2500 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:11000 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:3389 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:80 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:24837 to:192.168.1.2
Chain POSTROUTING (policy ACCEPT 40 packets, 2673 bytes)
pkts bytes target prot opt in out source destination
117 5741 MASQUERADE all -- any eth1 anywhere anywhere
Chain OUTPUT (policy ACCEPT 44 packets, 3457 bytes)
pkts bytes target prot opt in out source destination
What should i do to correct this?
When I forward a port to a local IP-address, say port 21, the forwarding works from the outside. But i cannot use the external ip-adress from the inside.
Example:
ISP IP-address: 213.73.236.154
IP of server: 192.168.1.2
Random *external* IP: 146.50.9.20
146.50.9.20 -> 213.73.236.154 is forwarded correctly
192.168.1.* -> 213.73.236.154 is NOT forwarded. It gives me connection errors and port 80 shows the wl500g configuration page.
I am using Oleg's latest firmware and the router is in home gateway mode.
iptables -L -v -t nat says:
~ # iptables -L -v -t nat
Chain PREROUTING (policy ACCEPT 473 packets, 45986 bytes)
pkts bytes target prot opt in out source destination
0 0 REDIRECT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:8100 redir ports 80
0 0 REDIRECT tcp -- br0 any anywhere 213.73.236.154 tcp dpt:8100 redir ports 80
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:21 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpts:2000:2100 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:11900 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:2500 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:11000 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:3389 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:80 to:192.168.1.2
0 0 DNAT tcp -- eth1 any anywhere 213.73.236.154 tcp dpt:24837 to:192.168.1.2
Chain POSTROUTING (policy ACCEPT 40 packets, 2673 bytes)
pkts bytes target prot opt in out source destination
117 5741 MASQUERADE all -- any eth1 anywhere anywhere
Chain OUTPUT (policy ACCEPT 44 packets, 3457 bytes)
pkts bytes target prot opt in out source destination
What should i do to correct this?