Archiv verlassen und diese Seite im Standarddesign anzeigen : Linux Router
Eigentlich reicht es doch schon, wenn man die IP Weiterleitung an macht, und der Linux Rechner online ist, dann müsten doch eigentlich alle Clients den als gateway/DNS Server benutzen können, oder??? gibts da irgentwo nen howTo???
Sorry, ich bin n00b in sachen linux Routing, ich habs bis jetzt immer nur als Sever Betribsystem eingesetzt!:ugly:
da nun fast jeder 2. Thread in diesem Forum um Routerbau geht kann ich dir URL schon auswendig *G*
http://www.linuxforen.de/forums/showthread.php?s=&threadid=60561&highlight=router+howto
thx, ich werd mal gucken...:)
Und da bin ich schon wieder...
Also Routing klapt super, aber das portforwarding was ich mit dem iptabels generator gemacht habe, funzt net, beim starten sachta auch nur "Unknown arg '--to-destination'
# NAT fuer EDONKEY
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 4661 -j DNAT --to-destination 192.168.0.2
iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 4661 -j SNAT --to-source $LAN_IP
iptables -A FORWARD -i ppp0 -m state --state NEW -p tcp -d 192.168.0.2 --dport 4661 -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 4662 -j DNAT --to-destination 192.168.0.2
iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 4662 -j SNAT --to-source $LAN_IP
iptables -A FORWARD -i ppp0 -m state --state NEW -p tcp -d 192.168.0.2 --dport 4662 -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 4663 -j DNAT --to-destination 192.168.0.2
iptables -t nat -A POSTROUTING -o eth0 -p tcp --dport 4663 -j SNAT --to-source $LAN_IP
iptables -A FORWARD -i ppp0 -m state --state NEW -p tcp -d 192.168.0.2 --dport 4663 -j ACCEPT
iptables -t nat -A PREROUTING -i ppp0 -p udp --dport 4665 -j DNAT --to-destination 192.168.0.2
iptables -t nat -A POSTROUTING -o eth0 -p udp --dport 4665 -j SNAT --to-source $LAN_IP
iptables -A FORWARD -i ppp0 -m state --state NEW -p udp -d 192.168.0.2 --dport 4665 -j ACCEPT
lass mal das -destination weg
also
--to 192.xxx.xxx.xxx
die option "--to-destination" war schon richtig.
# man iptables
...
--to-destination ipaddr[-ipaddr][: port-port]
which can specify a single new destination IP address, an inclusive range of IP addresses, and
optionally, a port range (which is only valid if the rule also specifies -p tcp or -p udp).
If no port range is specified, then the destination port will never be modified.
Also nur so???
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 4661 -j DNAT 192.168.0.2
lass mal die ganzen SNAT regeln weg, weil das macht eh schon das Masquerading für dich
das --to-destination war schon richtig bei DNAT
das ist ein "iptables-generator" generiertes script oder ?
den fehler mit dem --to-destination hatte ich auch, aber in dem teil, den du gepostet hast (edonkey) kommt er nicht vor. irgendwo anders im script fehlt die IP hinter --to-destination
MfG
formtapez
öhm, jetzt blick ich nichtmer so gaz durch! Kann mir jemand nen beispiel für nen Port machen? :)
also bei mir sieht das so aus für ED
iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport 4662 -j DNAT --to-destination 192.168.0.1:4662
iptables -t nat -A PREROUTING -i ppp0 -p udp --dport 4672 -j DNAT --to-destination 192.168.0.1:4672
mehr nich, achja die Forward Chain steht per default auf Accept
iptables -P FORWARD ACCEPT
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.