Hallo,
Ik heb een probleem met het opzetten van een slackware-router.
In deze machine zitten 2 netwerkkaarten (3com en realtek) .
Op de 3com (eth0) zit de adsl-verbinding en deze werkt ook goed, ik kan Internetten om het zo maar te zeggen.
In /etc/rc.d/rc.modules heb ik de volgende regels staan:
Dit is code die default door Slackware er al neer wordt gezet en ik heb dit dus alleen geuncomment. Verder heb ik het rc.ip_forward script ook aan staan bij het booten.
Het lijkt er op dat het werkt, want ik kan vanaf een XP-client gewoon pingen naar alle ip-adressen. Nameserver werkt echter niet, ik heb de nameservers op de client ingesteld (ik kan deze nameservers ook pingen). Helaas kan ik toch niet "gewoon" internetten. Wie weet raad?
Ik heb een probleem met het opzetten van een slackware-router.
In deze machine zitten 2 netwerkkaarten (3com en realtek) .
Op de 3com (eth0) zit de adsl-verbinding en deze werkt ook goed, ik kan Internetten om het zo maar te zeggen.
In /etc/rc.d/rc.modules heb ik de volgende regels staan:
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
| # IP masquerading modules: # These modules are used with IP masquerading, a process which allows you to # use a Linux box connected to the Internet (via PPP or SLIP, or some other # means) as a gateway for other Linux, Windows, Macintosh boxes on your local # network that don't have real IP addresses on the Internet. The packets # going through the Linux machine are "masqueraded", or made to look as if # they're all coming from the one real IP address on the Internet. # # As a quick example (for a much more extensive treatment, see the IP-Masquerade # mini-HOWTO) to allow Internet access to a local network 192.168.11.0 with a # netmask of 255.255.255.0, you'd use these commands in /etc/rc.d/rc.local: # # # EXTERNAL -> external network interface # # INTERNAL -> internal network interface EXTERNAL=eth0 INTERNAL=eth1 echo 1 > /proc/sys/net/ipv4/ip_forward echo "Setting up NAT (Network Address Translation)..." # # by default, nothing is forwarded. iptables -P FORWARD DROP # # Allow all connections OUT and only related ones IN iptables -A FORWARD -i $EXTERNAL -o $INTERNAL -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -i $INTERNAL -o $EXTERNAL -j ACCEPT # # enable MASQUERADING iptables -t nat -A POSTROUTING -o $EXTERNAL -j MASQUERADE # # Then you'd have to set the other boxes on your local network to use the # Linux machine as their TCP/IP gateway. You'll probably also need to plug # in the IP address for your Internet service provider in each machine's DNS # setup. # # Now, on to the IP masquerading modules. The example above is good enough # for most things that use TCP in a relatively simple fashion. It'll work # for telnet and http, for instance. But, the system breaks down when you # get protocols that use ports in more complicated ways. Luckily the Linux # kernel gurus have thought of this and have prepared some modules that # support masquerading of trickier protocols. The ipchains command is mighty # flexible as well, and a lot of things can be made to work just by setting # that up correctly. # # Special modules for iptables. See also "man iptables" for information about # that powerfull firewall tool. # /sbin/modprobe ipt_conntrack /sbin/modprobe ip_conntrack /sbin/modprobe ip_conntrack_ftp /sbin/modprobe ip_conntrack_irc /sbin/modprobe ip_nat_ftp /sbin/modprobe ip_nat_irc /sbin/modprobe ip_nat_snmp_basic |
Dit is code die default door Slackware er al neer wordt gezet en ik heb dit dus alleen geuncomment. Verder heb ik het rc.ip_forward script ook aan staan bij het booten.
Het lijkt er op dat het werkt, want ik kan vanaf een XP-client gewoon pingen naar alle ip-adressen. Nameserver werkt echter niet, ik heb de nameservers op de client ingesteld (ik kan deze nameservers ook pingen). Helaas kan ik toch niet "gewoon" internetten. Wie weet raad?