Quellcode |
|
1 |
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.1/24 -j MASQUERADE |
Quellcode |
|
1 |
echo 1 > /sys/net/ipv4/ip_forward |
Quellcode |
|
1 |
emerge -va net-firewall/iptables |
Quellcode |
|
1 2 3 4 5 6 |
localhost andreas # eix iptables [I] net-firewall/iptables Available versions: 1.3.5-r4 ~1.3.6 ~1.3.6-r1 ~1.3.7 ~1.3.8 1.3.8-r1 1.3.8-r2 1.3.8-r3 ~1.4.0 ~1.4.0-r1 {extensions imq ipv6 l7filter static} Installed versions: 1.3.8-r3(21:40:29 26.03.2008)(ipv6 -extensions -imq -l7filter -static) Homepage: http://www.iptables.org/ http://www.linuximq.net/ http://l7-filter.sf.net/ Description: Linux kernel (2.4+) firewall, NAT and packet mangling tools |
Quellcode |
|
1 2 3 4 5 6 7 |
localhost andreas # echo 1 > /sys/net/ipv4/ip_forward bash: /sys/net/ipv4/ip_forward: Datei oder Verzeichnis nicht gefunden localhost andreas # iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.1/24 -j MASQUERADE FATAL: Module ip_tables not found. iptables v1.3.8: can't initialize iptables table `nat': iptables who? (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded. localhost andreas # |
Zitat
FATAL: Module ip_tables not found.
iptables v1.3.8: can't initialize iptables table `nat': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Quellcode |
|
1 2 |
cd /usr/src/linux make menuconfig |