wiec z jednego forum mam informacje jak mozna zrobic cos na linuksie:
With a Linux 2.4 kernel box as the router (I think it's a more common option than a D-Link Router) it goes like this:
iptables -A PREROUTING -t nat -j DNAT -p udp -d EXTERNAL_IP --dport HPORT --to-destination INTERNAL_IP:6112
iptables -A POSTROUTING -t nat -j SNAT -p udp -s EXTERNAL_IP --sport 6112 --to-source INTERNAL_IP:HPORT
Where:
INTERNAL_IP is the IP of the box inside the network (such as 10.0.0.1 or 192.168.1.1).
EXTERNAL_IP is the IP of the entire network on the Internet
HPORT is a high port (I use 63001-63255), assigned especially for this purpose.
These two rules have to be repeated for _every_ box in the network you want to forward, the HPORT being different for every box, such as 63001 for 10.0.0.1, 63002 for 10.0.0.2 etc.
teraz moje pytanie, wystarczy ze wpisze te regulki w zakladce firewall zapisze, i dam reboot? bo cos nie chce dzialac:) czy router trzeba jakos restartowac "recznie" ? Jeszcze jedno, czy w miejscu zew ip mam podawac ip mojego dsl? takie na ktorym jestem widziany w necie?
z gory dzieki za pomoc.
a takie cos dodalem:
iptables -A PREROUTING -t nat -j DNAT -p udp -d 83.12.223.xxx --dport 63001 --to-destination 192.168.1.146:6112
iptables -A POSTROUTING -t nat -j SNAT -p udp -s 83.12.223.xxx --sport 6112 --to-source 192.168.1.146:63001
iptables -A PREROUTING -t nat -j DNAT -p udp -d 83.12.223.xxx --dport 63002 --to-destination 192.168.1.100:6112
iptables -A POSTROUTING -t nat -j SNAT -p udp -s 83.12.223.xxx --sport 6112 --to-source 192.168.1.100:63002
iptables -A PREROUTING -t nat -j DNAT -p udp -d 83.12.223.xxx --dport 63003 --to-destination 192.168.1.109:6112
iptables -A POSTROUTING -t nat -j SNAT -p udp -s 83.12.223.xxx --sport 6112 --to-source 192.168.1.109:63003
Edytowany przez nedudej dnia 03-03-2007 12:35
|