Click to See Complete Forum and Search --> : Networking Linux with Cable Modem


maxb
09-09-2002, 03:26 PM
Hi all
I have recently set up a Linux box using RedHat 7.3. Everything about the install went fine, until I tried to set up internet access via my cable modem.

eth0 appears to work fine, and using the Network Configuration tool under Gnome looks good. However, is a cable modem the same as xDSL? It seems to work, after being activated in the Network Configuration, but keeps going Inactive after approx 10 seconds. Even though I want PPP activated in the boot sequence, Linux says it cannot do this.

I am using an SMC router on my network, with broadband interface, to allow sharing on the cable modem. Under Windows, this works brilliantly, and I would like the same functionality under Linux.

Please help a very frustrated newbie....

shadowwebs
09-10-2002, 08:02 PM
I just went throught the same thing today. Accept I was told by my cable ISP that Linux is not supported by them and that I could not go directly from my linux box to the network, but could use a windows machine as a gateway.. BS!!!

I viewed a post in one of these threads that I caould use the DHCP features and all would be fine... wrong!

What I ended up doing was using a XP machine, renaming it to my CX # and letting it detect the proxy. . I then found out what the IP was that the DHCP was lending me, and also noted the submask #'s. Normally I would setup a submask as 255.255.255.0, but that was not the case here. One of those numbers were different.

I then setup a new profile, but did not use the DHCP option, I used the IP addy and the submask numbers. There is a option to choose dhcp, static or pboot. I ended up using pboot with IP and submask and Bang!!! I was online...

STORMPROOF
09-10-2002, 10:21 PM
THIS WILL GET YOUR LINUX FIREWALL GATEWAY GOING
GUARANTEED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!

I am assuming you have a linux box allready setup with 2 nics. Make sure that there are no gateway settings configured on either one of the network interfaces. Trust me.

Do the following in order. Quick and simple

1Make sure eth0 is setup for DHCP and to start on boot. Give eth1 a static private IP such as 192.168.0.1 or 10.0.1.1. NOTE: If you are clueless about IP ADDRESSING setup eth0 for DHCP and to start on boot. Eth1 give it the following address 10.0.1.1 and a subnet mask of 255.255.0.0 and also to start up on boot

2.Make sure that you get a IP from you ISP by typing ifconfig

3.Eth0 should recieve a WAN IP.

4.Eth1 should have a private IP assigned by you. You can use 192.168.0.1 or 10.0.1.1....................whatever!

5.If everything is good, proceed.

6.Type ntsysv and disable ipchains and iptables6 if checked. Do not DISABLE regular iptables. There are 2 versions of iptables in some linux distributions. REBOOT

7.Type ifconfig again to make sure your ethernet interfaces are ok. You should have an IP on eth0,eth1 and lo which is your loopback.

8. Pay close attention

9. Type the following in order. The things that are in quotation marks "enter in your IP" Make sure to pay close attention to the syntax and also to space before the hyphens


(accepts all traffic)
iptables -P INPUT ACCEPT

(accepts loopback)
iptables -A INPUT -i lo -d 127.0.0.1

(accepts your lan)
iptables -A INPUT -i eth1 -d "192.168.0.0/24" -j ACCEPT


(helps eth0 with dynamic IP)
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

(enables forwarding)
echo 1 > /proc/sys/net/ipv4/ip_forward


(saves firewall rules)
/sbin/service iptables save


(Important you must do)
Now guys and girls go to the GUI and edit the /etc/sysctl.conf file.
where it says net.ipv4.ip_forward = 0 change the 0 to a 1
and save your changes.

why you are in there, make rp_filter 1 instead of 0



Now for your other computers make sure that the gateway is the same IP as eth1 on the firewall you just configured. You should be able to access the internet from another computer.

Once you make the changes that is it. The magic will happen immediately!!! Please let me know if you need any more help. This will just GET YOU GOING. Does not provide by no means of HIGH SECURITY.