Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Simple Internet sharing with Knoppix, settings, wizard, GUI?

  1. #1
    Senior Member registered user
    Join Date
    Oct 2003
    Location
    Midlands, UK
    Posts
    145

    Simple Internet sharing with Knoppix, settings, wizard, GUI?

    I'm looking forward to the day I can replace Window$ 98SE with Knoppix/Debian and with that in mind, I have configured my PC dual boot. (Well..... W98SE is an unsupported obsolete OS!).

    What I an trying to do is check that I can do 'what I need to' using Knoppix. Here is the first one of the things I'm struggling with:-

    I need Knoppix to do the equivalent of ICS. I've read LOTS! on the web and this is what I understand so far.

    1). I need to use the Linux feature 'masquerading' - which is built in to the Kernal.
    2). Knoppix is based on kernal 2.4.x so I need to use 'iptables' (not 'ipchains' used in earlier kernals).
    3). I understand that my internet ethernet port is 'eth0' and uses DHCP and is autoconfigured by Knoppix. (and works just fine).
    4). My intranet port is 'eth1' - Knoppix tries to configure DCHP and (naturally fails) - I understand that I can use 'ifconfig ethx' to check the ethernet port settings and 'netcardconfig' to change them.

    So, I found this and tried it out:-

    echo '1' > /proc/sys/net/ipv4/ip_forward
    iptables -P INPUT ACCEPT
    iptables -P OUTPUT ACCEPT
    iptables -P FORWARD DROP
    iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
    iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
    iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

    So, it also says that I need to start/stop iptables before making these changes, eg.

    service iptables stop

    But 'service' is not recognised. .....and when I try and use netcardconfig to set eth1 to 192.168.0.1 and all that good stuff for the intranet, it just comes back 'fail, network down' or similar and it even stops eth0 from working.

    Dang, dang, dang! I'm no stranger to the obscure and difficult being a former Nortel DMS switch translations engineer..... but this is hard work!

    I also tried without success to get 'linuxconf' 'ipmasq' 'firewall-easy' and 'firestarter' working.....

    Cheers, Stuart.....

  2. #2
    Senior Member registered user
    Join Date
    Oct 2003
    Location
    Midlands, UK
    Posts
    145
    I just found out that the Debian equivalent of:-

    service iptables 'command'

    is:

    /etc/init.d/iptables 'command'

    Anyone know what I'm (still) missing?

    Stu.....

  3. #3
    Junior Member
    Join Date
    Oct 2003
    Location
    Stamford, CT
    Posts
    3
    ifconfig eth1 192.168.0.1

    will change eth1's ip address from the command line. I don't know anything about netcardconfig but using ifconfig directly is tried and true. Typing it as I've specified without further options will set you up for subnet of 255.255.255.0 and broadcast of 192.169.0.255 so you needn't do anything there (unless you need other settings, man ifconfig is helpful).

    Hopefully this will help with the ethernet config.. As for the iptables setup, to my eyes, what you have should work. Were I not at school I'd test your config right now. To my knowledge, You shouldn't have to start/stop iptables to add your settings... Additionally, you might what to utilize iptables -L to see what's going on with your tables before you're adding your rules. If there are other entries, flush them with iptables -F INPUT
    iptables -F OUTPUT et cetera.

    ~Kevin

  4. #4
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    colorado springs, colorado
    Posts
    1,933
    Quote Originally Posted by stukennedyuk
    I just found out that the Debian equivalent of:-

    service iptables 'command'

    is:

    /etc/init.d/iptables 'command'

    Anyone know what I'm (still) missing?

    Stu.....
    Your options are:

    /etc/init.d/iptables start|restart|reload|force-reload

    So an example would be:

    /etc/init.d/iptables start

    Maybe something like the following will get you started. Of course this just allows ICS- you'll still need to configure a firewall.

    echo 1 > /proc/sys/net/ipv4/ip_forward
    ipchains -I forward -s 192.168.0.0/24 -d 0/0 -j MASQ

    This is THE Linux firewall site A few more links:

    http://tldp.org/HOWTO/Authentication...WTO/setup.html
    http://tldp.org/HOWTO/Masquerading-S...O/summary.html

  5. #5
    Senior Member registered user
    Join Date
    Oct 2003
    Location
    Midlands, UK
    Posts
    145
    Many thanks, I'll try these suggestions out and let you know how I get on!

    Stuart.....

  6. #6
    Senior Member registered user
    Join Date
    Nov 2002
    Posts
    1,353
    You might want to do an apt-get install firestarter.

    Firestarter has a nice internet connection sharing option. It's all gui based. It's just another option you might try.

  7. #7
    Senior Member registered user
    Join Date
    Oct 2003
    Location
    Midlands, UK
    Posts
    145
    The key problem I seem to have is this:-

    root@ttyp0[knoppix]# ipchains -I forward -s 192.168.0.0/24 -d 0/0 -j MASQ
    ipchains: Protocol not available

    What does it mean? I checked in Kpackage and it says ipchains is installed.....

    [whole transaction:-

    root@ttyp0[knoppix]# iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    root@ttyp0[knoppix]# ifconfig eth0
    eth0 Link encap:Ethernet HWaddr 00:02:8A:66:33:5D
    inet addr:81.101.112.140 Bcast:255.255.255.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:17630 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1332 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:1116705 (1.0 MiB) TX bytes:84677 (82.6 KiB)

    root@ttyp0[knoppix]# ifconfig eth1 192.168.0.1
    root@ttyp0[knoppix]# ifconfig eth1
    eth1 Link encap:Ethernet HWaddr 00:0A:E6:76:4E:48
    inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:0 (0.0 b) TX bytes:2052 (2.0 KiB)
    Interrupt:11 Base address:0xd000

    root@ttyp0[knoppix]# echo 1 > /proc/sys/net/ipv4/ip_forward
    root@ttyp0[knoppix]# ipchains -I forward -s 192.168.0.0/24 -d 0/0 -j MASQ
    ipchains: Protocol not available
    root@ttyp0[knoppix]# iptables -L
    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    root@ttyp0[knoppix]#

    ]

    Cheers, Stu.....

  8. #8
    Senior Member registered user
    Join Date
    Mar 2003
    Location
    colorado springs, colorado
    Posts
    1,933
    Ummm- I deserve a kick in the pants for that one. Like an idiot I posted ipCHAINS not iptables. Old habits are hard to break.
    I don't know if it's an option for you or not but I have an old pc that I use for a router and NAT (network address translation) or ICS as they say in wondoworld. I will have another look at ipTABLES and perhaps post something a bit more useful next time.

    Sorry- sometimes I am such a moron.

  9. #9
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    You may want to look at Arno's IPtables-Firewall the instructions are pretty easy to understand you should only have to change a couple of lines in the config files and put the files in the right place with proper permissions and be up running in no time.

  10. #10
    Senior Member registered user
    Join Date
    Oct 2003
    Location
    Midlands, UK
    Posts
    145
    Rickenbacherus wrote:

    Ummm- I deserve a kick in the pants for that one. Like an idiot I posted ipCHAINS not iptables. Old habits are hard to break.
    I don't know if it's an option for you or not but I have an old pc that I use for a router and NAT (network address translation) or ICS as they say in wondoworld. I will have another look at ipTABLES and perhaps post something a bit more useful next time.
    I typed it in and didn't notice, the 'problem' is working with the command-line, and the human aspect of not really reading! S'pose this is why the GUI was invented! - your help is appreciated..

    Stephen wrote:-

    You may want to look at Arno's IPtables-Firewall the instructions are pretty easy to understand you should only have to change a couple of lines in the config files and put the files in the right place with proper permissions and be up running in no time.
    I'll take a look at this today!

    Many thanks, Stu.....

    www.stuartkennedy.org.uk

Page 1 of 2 12 LastLast

Similar Threads

  1. Internet Connection Sharing...???
    By Jwizzman in forum Networking
    Replies: 8
    Last Post: 09-12-2004, 09:52 PM
  2. Internet sharing?
    By morfar in forum Networking
    Replies: 2
    Last Post: 09-09-2004, 02:53 AM
  3. Sharing Internet Connection with Knoppix
    By iisatrini in forum Networking
    Replies: 2
    Last Post: 03-09-2004, 09:07 PM
  4. Replies: 2
    Last Post: 02-11-2004, 02:26 AM
  5. Replies: 2
    Last Post: 06-11-2003, 09:33 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
  •  


OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN picture

OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN

$115.00



Ubuntu Server 26.04.1 LTS Bootable USB Flash Drive – Latest September 2026 picture

Ubuntu Server 26.04.1 LTS Bootable USB Flash Drive – Latest September 2026

$12.99



ESET Server Security (File Security) | Variant Item | Download Version picture

ESET Server Security (File Security) | Variant Item | Download Version

$136.15



All New Ubuntu 26.04 LTS Linux Bootable USB Flash Drive picture

All New Ubuntu 26.04 LTS Linux Bootable USB Flash Drive

$15.95



OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 512GB SSD 8x NIC QAT AES VPN picture

OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 512GB SSD 8x NIC QAT AES VPN

$128.00



Toshiba Magnia SG20 VPN Linux server Web server (No HDD, *Read*) - picture

Toshiba Magnia SG20 VPN Linux server Web server (No HDD, *Read*) -

$60.00



1U Rackmount PC Intel Core i5-2520M 8GB RAM 500GB HDD Ubuntu Linux Server picture

1U Rackmount PC Intel Core i5-2520M 8GB RAM 500GB HDD Ubuntu Linux Server

$109.99



Microsoft SQL Server 2022 Standard 24 Core unlimited CAL Retail License Package picture

Microsoft SQL Server 2022 Standard 24 Core unlimited CAL Retail License Package

$199.00



Sun Enterprise e450 400mhz cpu(x4), 4gb ram, 9gb HD w/spud most complete on ebay picture

Sun Enterprise e450 400mhz cpu(x4), 4gb ram, 9gb HD w/spud most complete on ebay

$500.00



Red Hat Enterprise Linux 5 Server DVD English OS Media Kit RHF0382US picture

Red Hat Enterprise Linux 5 Server DVD English OS Media Kit RHF0382US

$41.30