problems with iptables NAT
I'm trying to get an iptables script working for my linux box so that I can basically use it as a router. The setup is fairly weird for reasons beyond my control, so bear with me while I outline it (This is why I couldn't find any examples etc to help me through it).
I've got a ADSL router which is set to do NAT itself, but it's one I cannot admin and have to go get somebody to change it every time I want a new port forwarded, and bridging it is out of the question, so I've just gotten them to forward every port through to my linux box and I'm redistributing them from there. So essentially I'm routing data back out on the same interface it's comming in on (eth0, the only interface on the whole machine) I can route ports to itself easily, for example I tested routing 3000 to 6667 and my IRC could find the IRCD. When I attempt to route to other ip's though I get errors. When I routed port 3100 on the linux server back to 2000 on my windows machine and listened with hyperterminal and then telnetted to port 3100 on the linux box I recieved a connection in (My windows firewall noticed it) and then hyperterminal stopped listening and the connection failed. I also tried routing it out to a friend's machine who was hosting an IRCD and the IRCD reported "Can't allocate fd for socks on [@IP.REMOVED.WEIRDNUMBER]" and failed to connect. Below is the whole script I am using to create my iptables. A few comments to help everyone trying to read: My windows machine: 192.168.1.99 My linux box: 192.168.1.100 My internet IP is non-static so I have used 0.0.0.0/0 to represent all IP's. This is pretty much the first time I've used iptables, and the below was put together from reading a few tutorials. hopefully somebody can show me what I've done wrong. Code:
#!/bin/sh |
adsl router
Hi!
Wich ADSL router have? Some routers in the manual supports the mapping of high ports, but in the reality it do not do it. When they are formed in high ports they do not generate error message and they happen problems similar to which you comment. A very known router with this problem is the Amigo (Conexant) CA-61. This problem has solved in part by a upgrade of the firmware released by the fabricant. Regards, |
All times are GMT -5. The time now is 12:47 AM. |