Defcon-1-Logo

           [Home]    [FBSD Articles]    [Scripts Corner]    [Contribute]    [Search]    [FBSD Links]    [Files]

About Us

FreeBSD Articles
  *Hardware
  *Networking
  *Security
  *Software
  *X Windows


Files / Scripts
Newbies Corner
Tech. Talk
Tips and Tricks


FreeBSD Links

Articles in other
Languages :
  *French Articles
  *Spanish Articles

Want to Help ?
 
   Click Here

Email Users5

Search:
 

 


FreeBSD Search:


 

 

Powered-By-Apache-Logo

Cable Modem How-To

Running FreeBSD 4.1 Release

I initially encountered trouble setting up a second NIC in my machine and decided to start over fresh. I pulled both network cards from my machine and this is what transopired.

I installed a cheapo Linksys 10/100 network card and booted with a GENERIC kernel. The kernel found the network card immediately which made my life easier.

NIC Setup:

Using /stand/sysinstall I configured my network card. Before I setup my NIC I restarted my cable modem as to allow a new lease for the connection. During the setup I was prompted to use IPV6 which I answered NO to and was then prompted to use DHCP which I did as I would have a dynamic connection. Setup found the gateway and the DNS server as well as giving me my IP and hostmask, all I had to insert was the hostname and domain. I then selected ok to continue and it fired my network card up. Doing a quik ping I found I was indeed connected to the Internet.

At this point I shutdown to install the second NIC. After installation and consequent boot I found that the route was unreachable and not a good thing for a full time connection to the net. I then used /stand/sysinstall to setup the 1st NIC again but was unsuccessful in obtaining a connection. I then tried it again but first restarting the cable modem which did the trick.

After a reboot if you cannot gain a connection to the net try restarting your cable modem before choosing to use DHCP. This renews your lease and gives fresh information (including IP) to your machine.

I then set up my second nick using the internal network IPs and hostmask as usual and I was able to then talk back and forth across the internal network.

I then CVSupped to 4.2 release and again had to restart my cable modem and setup my NIC. Some things I am going to have to live with I guess (not supposed to have to reboot anyway).

Routing to Win machines:

Well to be honest it is extremely easy to route to the windows machines. I followed Technoids HowTo on ipfilter and it worked like a charm. Here are some details:

First you need to open your kernel (/sys/i386/conf/YOURKERNEL) and add these two lines:

options IPFILTER

options IPFILTER_LOG

compile your kernel:

/usr/sbin/config KERNELNAME

then

cd ..

cd ..

cd compile

cd KERNELNAME

make depend

make

make install

shutdown -r now

after reboot

cd /etc

vi ipnat.rules

add these lines

map ed0 10.0.0.1/24 -> 203.34.23.121/32

(ed0 is the NIC that is connected to the cable modem and 10.0.0.1 is the fake IP of the second NIC in your machine and 203.34.23.121 is the real IP of your internet connection).

then fire ipnat

ipnat -f /etc/ipnat.rules

it works.

Some things to note:

Each time you reboot you may have to set up your NIC connected to the cable modem. When you reboot it appears to renew your lease and some times change your IP.

 Gizmo  v12.27.00

Email Us

ghostrdr@defcon1.org

This site cannot be duplicated without permission

© 1998 - 2010 Defcon1, www.defcon1.org. Copyrights for all materials on this web site are held by the individual authors, artists, photographers or creators. Materials may not be reproduced or otherwise distributed without permission of www.defcon1.org and the content's original author.