aber es funktioniert einfach nocht nicht.
Ich schildere mal meine Situation und Poste einen Teil des Quellcodes, hoffentlich kann mir jemand weiterhelfen.
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward # activate ip forwarding
echo "Routing aktivieren ...";
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE # Routing
rc_status -v
############## PORT FORWARDING ###############
iptables -t nat -A PREROUTING -p tcp -i eth1 -d 192.168.0.1 --dport 4662 -j DNAT --to 192.168.0.2:4662
iptables -A FORWARD -p tcp -i eth1 -d 192.168.0.1 --dport 4662 -j ACCEPT
Und hier noch zur veranschaulichung:
router:/etc/init.d # ifconfig
eth0 Link encap:Ethernet HWaddr 00:02:44:3D:30

C
inet addr:10.0.0.140 Bcast:10.0.0.255 Mask:255.255.255.0
inet6 addr: fe80::202:44ff:fe3d:30dc/10 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:135033 errors:0 dropped:0 overruns:0 frame:0
TX packets:214986 errors:0 dropped:0 overruns:0 carrier:0
collisions:17 txqueuelen:100
RX bytes:139550779 (133.0 Mb) TX bytes:18675985 (17.8 Mb)
Interrupt:10 Base address:0x5c00
eth1 Link encap:Ethernet HWaddr 00:02:44:21:B1:7A
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::202:44ff:fe21:b17a/10 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:93537 errors:0 dropped:0 overruns:0 frame:0
TX packets:131052 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:8478982 (8.0 Mb) TX bytes:134666504 (128.4 Mb)
Interrupt:9 Base address:0x7800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
ppp0 Link encap

oint-to-Point Protocol
inet addr:62.47.240.6 P-t-P:62.47.255.254 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1280 Metric:1
RX packets:130133 errors:0 dropped:0 overruns:0 frame:0
TX packets:89561 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:132450238 (126.3 Mb) TX bytes:6655699 (6.3 Mb)
ppp0 --> Verbindung ins Internet ADSL
eth0 --> ADSL Modem
eth1 --> IN LAN
der Port (4662,tcp) soll zum rechner 192.168.0.2 weitergeleitet werden
Ich hoffe jemand kann mir Helfen.