PDA

View Full Version : Problems Installing USB ADSL Ethernet Router in Mandrake 9.1



[linux] mb0o53
12-11-2003, 05:28 PM
Hi, i am planning to setup a dedicated firewall and server box using Mandrake 9.1, all has gone well up till now. I have just bought a DSE USB v2 ADSL Ethernet Router ( http://www.dse.co.nz/cgi-bin/dse.storefront/3fb1b1b50f05e8962740c0a87f99074d/Product/View/XH1149 )

Default Router Settings are:
Router IP address: 192.168.1.2
Subnet mask: 255.255.255.0
VPI: 0
VCI: 100
ATM Service Category: UBR
Encapsulation: PPPoA VC-Mux
DNS Proxy Selection: Auto Discovery + User Configured
Trellis: Enabled
Handshake Protocol: Autosense - G.dmt first
Wiring Selection: Tip/Ring
Bit Swapping: Disabled

I have been into Mandrake Control Center and used drakconnect to setup the ADSL internet connection, but when it comes to the selection of modem, i am at a loss with which one to choose. My router isn't there, so i am wondering if there are drivers out there which will work with my Router. If yes, also how to install these drivers and get this setup.

Thanks in advance
-Jordan

ilikelinux
12-11-2003, 05:42 PM
connect trough ethernet, and it will automatically be directed to the router, as it is a gate way.


p.s there isn't many ways a hacker can get in.


I have the exactly same router!

[linux] mb0o53
12-11-2003, 05:48 PM
ok, how do i go about doing this (sorry n00b here :p)

ilikelinux
12-11-2003, 05:51 PM
dhcp.

It is automaticly enabled on the router.

[linux] mb0o53
12-11-2003, 05:57 PM
so is this going from my linux box > dhcp > router?

Chilling_Silently
12-11-2003, 06:09 PM
DHCP should be fine. Ive never actually done DHCP in linux (/me blushes), but plugging it into your PC's LAN card it should pick it up correctly provided your LAN is actually "on" in Mandrake.
As root, try running:
/etc/rc.d/rc.inet1
That will bring up your ethernet interfaces.
You can run (again, as root)
ifconfig
This will show you the interfaces you have that are up and any relevant IP information etc.

Ilikelinux should be able to help you out if you're still wanting to use DrakConf, Ive never done it as Im not a real MDK fan ;-)

Hope this helps


Chill.

[linux] mb0o53
12-11-2003, 06:11 PM
i have my LAN card plugged into the linux box as eth0, it is setup with ip of: 192.168.0.1, are you saying that i can connect through eth0 to the router, bypassing the need to use the USB cable?

Chilling_Silently
12-11-2003, 06:20 PM
Yup, just change the IP of either your LAN card or the Router so they're both on 192.168.Y.Z (where Y is the same on both PC and Router) and you should be pretty much away.

You will probably need to set the gateway to the routers IP address.

And yes, you can do away with the USB cable if you do it like this :-)

ilikelinux
12-11-2003, 06:22 PM
with the usb cable, it just works like a usb network card thou

[linux] mb0o53
12-11-2003, 06:28 PM
alright cheers - ill do that now and see how it goes...

ilikelinux
12-11-2003, 06:32 PM
i hope we haven't confused u........

[linux] mb0o53
12-11-2003, 06:52 PM
lol...maybe - I went into drakconnect and setup my LAN card (eth0) to 192.168.1.2, the routers default IP, then i setup the internet connection as an ADSL connection using the DHCP protocol, and set the IP to 192.168.1.2, and the gateway to 192.168.1.2. This done, i went into "expert" mode and entered my login and password under configure internet access, and told it to connect through ethernet card eth0, the went into expert options for eth0 and set the protocol from static to dhcp. Then i clicked on connect, and hey presto - it said "connected", but just as soon, it disconnected. Any suggestions?

Chilling_Silently
12-11-2003, 07:04 PM
Your PC's IP should NOT be the same as the router, try 192.168.1.1 instead!

Murray P
12-11-2003, 07:08 PM
USB modem not LAN/ethernet. Or am I missing something here ?:| very similar to software modems.

Cheers Murray P

[linux] mb0o53
12-11-2003, 07:08 PM
by PC you mean LAN card? i have tried again a couple of times, and now it stays connected :)

ilikelinux
12-11-2003, 07:17 PM
Lets clear this up...

You don't need to install any drivers for the router.

If you are connecting through ethernet.

I think.........

[linux] mb0o53
12-11-2003, 07:19 PM
yep - i havnt installed any drivers for it - just said that i will connect through dhcp.

[linux] mb0o53
12-11-2003, 07:49 PM
hmm...whenver i try to visit a webpage on the linux box it times out..and even though i have setup the other computers on my network to connect throught the linux box, no gateway to the internet appears on any of them

Chilling_Silently
12-11-2003, 08:00 PM
This is where things get interesting.

Can you ping 210.48.100.45? That's pressf1.co.nz

Here's my setup:
my router is 192.168.0.1
My PC is running Slack 9.1 and is 192.168.0.2 on eth0
My PC's eth1 is 192.168.1.1

I've got a .sh file I run to setup the network and bring up the relevant interfaces.

What's your current setup (For all your LAN) and what are you hoping to achieve? Do you want your current PC do route internet to the others?

[linux] mb0o53
12-11-2003, 08:12 PM
no..i couldn't ping press f1 :S - my setup is as follows"

router = 192.168.0.1.2
Linux PC = 192.168.1.208 on eth0
and i dont have an eth1
PC2 = 192.168.0.2
PC3 = 192.168.0.4

this setup seems pretty screwed to me, this is what i would have liked:

router = 192.168.0.1
Linux PC = 192.168.0.3
PC2 = 192.168.0.2
PC3 = 192.168.0.4

I'm hoping for the main to comps (PC2 and PC3) to access the internet through Linux PC, Linx PC will be running firewall, squid etc. and all internet traffic will go through it.

[linux] mb0o53
12-11-2003, 08:25 PM
..hey im out for a while...please leave comments and stuff for me to look at when i get back :)
-jordan

Chilling_Silently
12-11-2003, 08:35 PM
Run down to DSE and grab another NIC for $20 or less (Depends on if you have WOL or not which you'll not be needing really).

Then we'll get it sorted.

Its not that hard ot get Linux routing... When you get your second NIC, then we can get started with that :-)

Chilling_Silently
12-11-2003, 08:36 PM
I suppose I should have added that the rest of the network is running on the 192.168.1.x range.

So I've got two LAN's with my PC being the median between them :-)

Get another NIC before you go any further :-)

bmason
12-11-2003, 09:59 PM
If you are running it over ethernet then all you should need to set up is a normal LAN connection, with the gateway set to the router IP (or just use DHCP). The router itself handles the ADSL stuff.

[I don't have ADSL so I'm not entierly sure.].

[linux] mb0o53
13-11-2003, 11:36 AM
OK, got that second NIC - where to from here?

Chilling_Silently
13-11-2003, 12:21 PM
Put this into a .sh file:
#Script writting by Raghuram Vijapurapu <vijapurapu[at]gmx[dot]net>
#Modified to suit by Chilling_Silence <chilling_silence[at]orcon[dot]net[dot]>

PATH=$PATH:/sbin:/usr/sbin
ifconfig eth0 down
ifconfig eth1 down

ifconfig eth0 192.168.0.2
ifconfig eth1 192.168.1.1

route add default gw 192.168.0.1

route add -net 192.168.1.0/24 eth1

modprobe ip_tables
iptables --flush
iptables --table nat --flush
iptables --delete-chain
iptables --table nat --delete-chain

iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT

echo 1 > /proc/sys/net/ipv4/ip_forward

#End Chills ipflush

This basically set it up so that iptables will forward all packets between the two ethernet cards.

My eth0 is 192.168.0.2 and eth1 is 192.168.1.1
The rest of the LAN runs off 192.168.1.x

Modify it to your needs, or simply set your up like mine... :-)

Hope this helps, post back if you need clarification on things

Cheers


Chill.

[linux] mb0o53
13-11-2003, 01:15 PM
thanks for that man :) just wondering what app i use to create the .sh file? ...i am very new to linux

segfault
13-11-2003, 01:31 PM
Just use a text editor. My favourite one is "nano" :) You will need to chmod it to 744 to make it executable. "chmod 744 filename"

[linux] mb0o53
13-11-2003, 01:32 PM
k wicked will do

[linux] mb0o53
13-11-2003, 02:02 PM
ok - used KWrite, and saved it as a plain txt file called script1, then changed the extension to *.sh - hopefully what i was ment to do - then i typed: chmod 744 script1 in the directory i saved it in, it didnt say that it did anything, but also didnt say invalid command, so im guessing it worked...where to from here?

ilikelinux
13-11-2003, 05:22 PM
the router has a fire wall built in, but it does not have packet inspection, but it still is a very good fire wall.

[linux] mb0o53
13-11-2003, 05:40 PM
....i also heard that having squid running and configured properly can speed things up a bit

ilikelinux
13-11-2003, 06:09 PM
what????

that must be a joke.

Correct me if i'm wrong Chilling_silently

Chilling_Silently
13-11-2003, 06:29 PM
Correct you if you're wrong about what? *Hint, Try quoting original message*

From here, if you've not changed it at all, your eth0 should now be 192.168.0.2 and your eth1 is 192.168.1.1
Plug in the cable that goes to your network switch into eth1 and the one to the router into eth0. Make sure your IP address of your router is 192.168.0.1 and you should be sweet :-)

And yes, Squid will speed things up for you by caching it... But leave that for another thread another day, we'll take it one step at a time here... :-)

And yes, if there were no error messages then you've run it correctly.

run (as root):
ifconfig
to see what your current settings are if you wish to confirm :-)

Hope this helps


Chill.

ilikelinux
13-11-2003, 06:38 PM
i quote. the thread about squid

>....i also heard that having squid running and configured properly can speed things up a bit

Chilling_Silently
13-11-2003, 06:41 PM
Yup, coz its caching websites locally!

It made a huge difference for me on dial-up.

Google had fully loaded on the Family's XP w/IE 6 SP1 before the actual browser had when it was using my proxy.

If not, it took a good 4-5 seconds on what was a slow and always over-used connection :-)

[linux] mb0o53
13-11-2003, 09:06 PM
i have a router with a built in 4 port switch....is that going to make things difficult?

Chilling_Silently
13-11-2003, 10:58 PM
could make things interesting if they're all connected to the router directly... is that how it is?

[linux] mb0o53
13-11-2003, 11:05 PM
yep

Chilling_Silently
14-11-2003, 12:13 AM
Bugger... :p

[linux] mb0o53
14-11-2003, 12:33 AM
this is quite bad?

Chilling_Silently
14-11-2003, 12:47 AM
hehehe... no, it just complicates things a little :p
I should have asked from the start ;-)

Lemme sleep on it.. maybe somebody else will offer something too.... its too late for my brain to work fuly anyways :-)


chill.

Chilling_Silently
14-11-2003, 09:18 AM
Okay....
All the PC's are on the same LAN...
If you're wanting them to run traffic through a Proxy, on your Linux PC, then you should just need to set your linux box as the Gateway (on each of the client machines) and you should be sweet from there. So long as your machine then has net access, the proxy will find that and do the packet routing itself.
Im not sure how that .sh file will affect things...

So, what's happening at the moment?
Has your PC/the rest of them got Internet access?

...It looks like you might not be needing that DSE NIC, lol ;-)
nm, Im sure it can be put to good use or returned if not, but hold that thought as somebody might suggest otherwise.

Let us know where you're at and we'll carry on from there :-)


Chill.

[linux] mb0o53
14-11-2003, 11:59 AM
OK - i have taken the second NIC out of the linux box, and got it so it can now access the internet, the network is as follows:

Router: 192.168.1.2
PC1: 192.168.1.3
PC2: 192.168.1.4
Linux Box: 192.168.1.5

I then setup the gateways on my PC1 and PC2 to 192.168.1.5, but they cannot access the internet. I can ping everything from all boxes, so i'm thinking there might be something i have to run on the linux box to be able to make itself into a gateway? im not sure :p

ilikelinux
14-11-2003, 12:32 PM
is squid started?

[linux] mb0o53
14-11-2003, 12:33 PM
no - should it be?

ilikelinux
14-11-2003, 02:36 PM
yes.

this is the proxing service.

[linux] mb0o53
14-11-2003, 03:34 PM
allright ill start that and see what happens

Chilling_Silently
14-11-2003, 04:41 PM
If you want a sample config file thats working (or a howto on setting up Squid), check my ftp:
ftp://Chillingsilence[dot]no-ip[dot]com

Anonymous login, and dont even bother trying to upload.
The squid.conf file is in the ~/ folder, so you can take a look at that.
Or, if you havent got squid yet, you can download and compile the source with full instructions from in ~/Install/source/squid/

You should just be able to run (as root) the following command if its been setup correctly:
squid &


Hope this helps :-)


Chill.

[linux] mb0o53
15-11-2003, 01:18 AM
hi - got squid running and have taken the squid.conf file off ure ftp - what changes will i need to make to this file to get it working with my network?

Chilling_Silently
15-11-2003, 09:51 AM
None.

its my working .conf file...
It depends on how you've set yours up because my cache folder is /cache

See my FTP for:
/Install/source/squid/Chills_Install_Notes

Might help :-)

Did you compile from source, use an rpm, or was it bundled?
AFAIK you'd only need to change your cache fodler setting in the conf file :-)


Chill.

Chilling_Silently
15-11-2003, 11:09 AM
Just had a quick flick through my config, and you'll likely need to do the following (as root):
1. groupadd squid
1. useradd -g squid -s /dev/null squid
3. mkdir /cache
4. chown -R squid:squid /usr/local/squid/logs
5. chown -R squid:squid /cache
6. ln -s /usr/local/squid/sbin/squid /bin/squid (or wherever your squid was installed to, this might not be neccesary
7. squid -z
8. add "squid &" without quotes to /etc/rc.d/rc.local

That last command will make it autoload on boot :-)
Lemme know how you get on :-)

[linux] mb0o53
18-11-2003, 07:12 PM
hi - i think my squid must have been installed other places than ures for some reason :S when i run squid& after replacing the default squid.conf with the on off ure ftp i get this:

[root@localhost Desktop]# squid&
[1] 3539
[root@localhost Desktop]# FATAL: Could not determine fully qualified hostname. Please set 'visible_hostname'

Squid Cache (Version 2.5.STABLE1-20030121): Terminated abnormally.
CPU Usage: 0.030 seconds = 0.020 user + 0.010 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 355

[1]+ Aborted (core dumped) squid

and when the service starts i get this error:

[root@localhost Desktop]# service squid start
init_cache_dir ufs:/cache... /etc/init.d/squid: line 147: 3553 Aborted (core dumped) $SQUID -z -F 2>/dev/null
Starting squid: /etc/init.d/squid: line 147: 3555 Aborted (core dumped) $SQUID $SQUID_OPTS 2>/dev/null
[ OK ]
[root@localhost Desktop]# service squid restart
Stopping squid: /etc/init.d/squid: line 147: 3570 Aborted (core dumped) $SQUID -k check >/dev/null 2>&1
[FAILED]
init_cache_dir ufs:/cache... /etc/init.d/squid: line 147: 3573 Aborted (core dumped) $SQUID -z -F 2>/dev/null
Starting squid: [ OK ]
/etc/init.d/squid: line 148: 3575 Aborted (core dumped) $SQUID $SQUID_OPTS 2>/dev/null

any suggestions?

[linux] mb0o53
01-12-2003, 09:53 PM
anybody got any more help for me here?