-
Junior Member
registered user
Build an ISDN Router using Knoppix 3.3
Hi Experts,
I have setup my Notebook, a TECRA M1, to serve as an ISDN Router. Well, actually I'm still working on it, since I can't reach the internet from the client machines.
Here is what I have setup so far:
ISDN Router / Server:
* Toshiba TECRA M1, running Knoppix 3.3 from harddisk
* running Ndiswrapper 0.7 to enable the Centrino PRO2100 wireless network card; setup as Ad-Hoc wireless network
* Installed the ISC Software to setup a DHCP server for the local network over the PRO2100 network card
* Fritz! PCMCIA card to connect to the Internet via ISDN
Client machine:
* Apple iMac running Mac OS X 10.3
* Apple airport wireless network card to connect to the Knoppix ISDN Router
And here is what's working so far:
* DHCP server on the Knoppix ISDN Router is working; ISDN Router is assigne the IP address 192.168.0.1 on the wireless network card
* connection to the internet is established via the ISDN card
* iMac connects to the Knoppix router and gets a local IP address assigned (192.168.0.x)
* I can ping the Knoppix ISDN Router (ping 192.168.0.1)
* I can ping the iMac from the ISDN Router
* I can access the Internet from the Knoppix ISDN Router
And here is what's not working so far:
* I can't access the internet from the client machine (the Apple iMac)
I know that I'm probably missing only one route, but I don't know what route and how to set it up...
Any ideas would be greatly appreciated.
Thx, TorBu
And BTW, here is some more information on my config:
-----------------
*** ifconfig ***
-----------------
ippp3 Protokoll:Punkt-zu-Punkt Verbindung
inet Adresse:213.61.192.81 P-z-P:212.121.151.20 Maske:255.255.255.0
UP PUNKTZUPUNKT RUNNING NOARP MTU:1500 Metric:1
RX packets:3183 errors:0 dropped:0 overruns:0 frame:0
TX packets:3653 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:30
RX bytes:1782578 (1.6 MiB) TX bytes:413946 (404.2 KiB)
lo Protokoll:Lokale Schleife
inet Adresse:127.0.0.1 Maske:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1221 errors:0 dropped:0 overruns:0 frame:0
TX packets:1221 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:0
RX bytes:212183 (207.2 KiB) TX bytes:212183 (207.2 KiB)
wlan0 Protokoll:Ethernet Hardware Adresse 00:04:23:91:64:65
inet Adresse:192.168.0.1 Bcast:192.168.0.255 Maske:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6131 errors:0 dropped:0 overruns:0 frame:0
TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
Kollisionen:0 Sendewarteschlangenlänge:1000
RX bytes:599408 (585.3 KiB) TX bytes:11846 (11.5 KiB)
Interrupt:11 Speicher:dfdbf000-dfdbffff
-----------------
*** route -v ***
-----------------
Kernel IP Routentabelle
Ziel Router Genmask Flags Metric Ref Use Iface
212.121.151.0 * 255.255.255.0 U 0 0 0 ippp3
192.168.0.0 * 255.255.255.0 U 0 0 0 wlan0
default as1.fra.de.colt 0.0.0.0 UG 0 0 0 ippp3
----------------------------------
*** /etc/network/interfaces ***
----------------------------------
auto lo wlan0
iface lo inet loopback
iface wlan0 inet static
address 192.168.0.1
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
-
Junior Member
registered user
It is working: I am able to share the internet connection I establish with my Linux box. And here is how I did it:
My Linux box is equipped and setup as follows:
ippp1 – ISDN interface to receive DHCP from my Service Provider
wlan0 – Wireless network card for my internal network, manually assigned IP 192.168.0.1 (see step 2)
Step 1
Install DHCP and edit dhcpd.conf as follows
#dhcpd.conf
#
ddns-update-style ad-hoc;
default-lease-time 1800;
max-lease-time 72000;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1; # IP of wlan0 / internal network
option domain-name-servers <IP DNS 1>, <IP DNS 2>; #Check with your ISP
option domain-name “<name of your Linux box” How you named your Linux box during setup
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.02 192.168.0.10;
}
Step 2
Edit /etc/network/interfaces file as follows
#interfaces
#
auto wlan0
iface wlan0 inet static
address 192.168.0.1
network 192.168.0.0
netmask 255.255.255.0
broadcast 192.168.0.255
Step 3
Restart Your Network by issuing the following command from a shell:
/etc/init.d/networking restart
Step 4
- Set your client machines to receive DHCP from this server
- Ping your Linux box / Server from your client to ensure everything is okay
Step 5
Create Firewall Scrip rc.firewall in order to allow packet forwarding
1. touch /etc/init.d/rc.firewall #creates rc.firewall script
2. edit rc.firewall as follows:
#!/bin/bash
/sbin/iptables -F
/sbin/iptables -t nat -F
/sbin/iptables -t mangle -F
/sbin/iptables -X
/sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A INPUT -m state --state NEW -i ! ippp1 -j ACCEPT
# only if both of the above rules succeed, use
/sbin/iptables -P INPUT DROP
/sbin/iptables -A FORWARD -i ippp1 -o wlan0 -m state --state ESTABLISHED,RELATED -j ACCEPT
/sbin/iptables -A FORWARD -i wlan0 -o ippp1 -j ACCEPT
echo "1" > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o ippp1 -j MASQUERADE
/sbin/iptables -A FORWARD -i ippp1 -o ippp1 -j REJECT
Step 6
Make rc.firewall script executable:
chmod +x /etc/init.d/rc.firewall
Step 7
Run rc.firewall script:
/etc/init.d/rc.firewall
Your server/router box should now be able to route internet traffic from and to your LAN throu your shared ISDN internet connection.
Action items:
- Create your own firewall script to suit your own needs, in case the one provided here is not sufficient
- Set rc.firewall to run at boot time so you do not have to start the script manually every time you (re-)boot (e.g. as described here)
- Automatically establish an internet connection if a client tries to access the internet
- Make ibod (bandwidth on demand) work with this solution
Credits
This solution has been developed by canjfn and I found it here.
Enjoy.
Torbu
BTW: If anybody here knows how to automatically establish an internet connection from the Linux box, every time a client tries to access the internet, please feel free to post it here!
Similar Threads
-
By ralfS in forum Networking
Replies: 0
Last Post: 08-12-2005, 02:55 PM
-
By lfs in forum Customising & Remastering
Replies: 3
Last Post: 08-09-2005, 03:58 AM
-
By dubayou in forum General Support
Replies: 0
Last Post: 06-16-2004, 03:53 AM
-
By Webster in forum Customising & Remastering
Replies: 1
Last Post: 05-27-2004, 03:23 PM
-
By beforewisdom in forum General Support
Replies: 3
Last Post: 04-19-2003, 02:54 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
HP Workstation Z640 2x Xeon E5-2623V4 32GB Ram 2x256GB SSD Quadro K420 NO OS GA
$164.98
Intel Xeon Gold 6248 SRF90 2.5GHz 20-Core 28MB CPU Processor With Thermal Block
$320.00
Intel Xeon Platinum 8180M SR37T 2.50GHz 28 Core Processor
$299.95
DELL PowerEdge R730 16SFF Server 2x E5-2680v4 2.4GHz =28 Cores 128GB H730 4xRJ45
$372.00
Intel Xeon Gold 6138 2.0GHz 27.5MB 20-Core 125W LGA3647 SR3B5
$35.50
Intel SR2N7 Xeon E5-2680 V4 14-Core CPU Processor 2680V4 GRADE-A
$15.95
Intel Xeon E5 2698 V4 2.20GHz 20 Core CPU SR2JW 2011-3 USA SELLER USA
$64.75
Intel Xeon E5-2697 V3 2.6 GHz 14 Core Processor - SR1XF
$10.00
HP Z2 MINI G4 WORKSTATION | XEON E-2176G | 1TB | 32GB | WIN10 | REFURBISHED
$279.99
Intel Xeon Gold 6252 2.1GHz 35.75MB 24-Core LGA 3647 CPU / Processor ___ SRF91
$384.99