URL: https://www.overclockers.at/windows/iptables_68324/page_1 - zur Vollversion wechseln!
i hab 2 netze, 192.168.0.0 und 10.0.0.0; wie route ich das eine auf das andere?
bitte keine rtfm, posts; i weis eh das i mit man iptables des a irgendwie erfahren würd; aber i bin zu faul; thx
zum routen brauchst keine iptables...
da reicht ein einfaches "route add", mit den netzen und der routeradresse natürlich. wenn beides am selben router hängt wirst nichtmal das machen müssen sondern nur routing aktivieren. ( echo 1 > /proc/sys/net/ipv4/ip_forward )
aber für internet-connection-sharing brauch i scho iptables, oder?
net unbedingt.
funzen tuts scho mit
echo 1 > /proc/sys/net/ipv4/ip_forward
is aber net gangen; i werds ma nochmal anschauen, kann eh sein dass i was falsches gmacht hab
Zitat von pariaber i bin zu faul; thx
wennst internet connection sharing im sinne von nat meinst brauchst iptables/chains/wwi
masquerading
das brauchst du
ich schau dir kurz das richtige nach....
mfG
sokrates
das sollte hinhauen
Code:iptables: # Delete and flush. Default table is "filter". Others like "nat" must be explicitly stated. iptables --flush - Flush all the rules in filter and nat tables iptables --table nat --flush iptables --delete-chain - Delete all chains that are not in default filter and nat table iptables --table nat --delete-chain # Set up IP FORWARDing and Masquerading iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE iptables --append FORWARD --in-interface eth1 -j ACCEPT echo 1 > /proc/sys/net/ipv4/ip_forward - Enables packet forwarding by kernel
du brauchst http://www.google.com => "iptables script generator" oder "iptables script" und 2 minuten zeit es abzulegen und in die autostart zu legen
die forensuche hätte dir dieses script ausgespuckt => http://www.shadowweb.org/files/rc.firewall.txt welches philipp gepostet hat
Zitat von Sokratesdas sollte hinhauenCode:iptables: # Delete and flush. Default table is "filter". Others like "nat" must be explicitly stated. iptables --flush - Flush all the rules in filter and nat tables iptables --table nat --flush iptables --delete-chain - Delete all chains that are not in default filter and nat table iptables --table nat --delete-chain # Set up IP FORWARDing and Masquerading iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE iptables --append FORWARD --in-interface eth1 -j ACCEPT echo 1 > /proc/sys/net/ipv4/ip_forward - Enables packet forwarding by kernel
sag obs funkt
danke
mfg
Sokrates
So jetzt aber:
versuch mal mit:
modprobe ipt_MASQUERADE
wenns nicht geht dann
iptables -F; iptables -t nat -F; iptables -t mangle -F #Return
iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 123.12.12.12 #Return
ok eth0 ist deine externe nic mit ip 123.12.12.12 musst halt deine externe nic ob eth0 oder eth1 bis ethx und deine IP adresse einsetzten...
hth
viel spass
mfG
Sokrates
overclockers.at v4.thecommunity
© all rights reserved by overclockers.at 2000-2025