code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| root@RABO-Doos:~# cat /etc/init.d/router #! /bin/sh #ff alles weg ipchains -F forward #nix erdoor as def ipchains -P forward DENY #doorlaten echo 1 >/proc/sys/net/ipv4/ip_forward ipchains -A forward -s 10.1.1.0/255.255.255.0 -d 0.0.0.0/0.0.0.0 -j MASQ #verhoog time-out ipchains -M -S 3600 0 0 root@RABO-Doos:~# /etc/init.d/router ipchains: Protocol not available ipchains: Protocol not available ipchains: Protocol not available ipchains: setting MASQ timeouts failed: Protocol not available root@RABO-Doos:~# |
in de kernel heb ik wel ipchains aan staan:
Networking options ---> • Network packet filtering (replaces ipchains)
dan krijg je een extra optie;
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| IP: Netfilter Configuration ---> <*> Connection tracking (required for masq/NAT) <*> FTP protocol support <*> IP tables support (required for filtering/masq/NAT) <*> limit match support <*> MAC address match support <*> netfilter MARK match support <*> Multiple port match support <*> TOS match support <*> Connection state match support <*> Packet filtering <*> REJECT target support <*> Full NAT <*> MASQUERADE target support <*> REDIRECT target support <*> Packet mangling <*> TOS target support <*> MARK target support <*> LOG target support |
Ook heb ik m`n netwerkkaartjes in de kernel staan...
(ETH0 --> rtl8139 en ETH1 --> 3c509)
m`n route ziet er na /etc/init.d/router zo uit:
code:
1
2
3
4
5
| Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface localnet * 255.255.255.0 U 0 0 0 eth0 10.1.1.0 * 255.255.255.0 U 0 0 0 eth1 default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0 |
het is de bedoeling dat 10.1.1.* gerouterd wordt naar 192.168.0.*, met als gateway 192.168.0.1
Het is een testopstelling, voor als k ADSL krijg (heb nu kabel, dus al hardwarematige-router in netwerk...)
Wat doe ik fout?