LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-25-2005, 03:41 AM   #1
databox
LQ Newbie
 
Registered: Jul 2005
Distribution: novel suse linux enterprise server 9
Posts: 18

Rep: Reputation: 0
confgure linux box as a router


hi guys out there, i'm a newbie here...

got two quite similar problems :-

1) routing problem
machine : p4 1.6, 256mb ram, 20ghb hdd, eth0, eth1
o/s : suse linux enterprise server 9
adsl router ip : 192.168.0.1/255.255.255.0

currently configured eth0 as 192.168.1.1 and link it to LAN, eth1 as 192.168.0.2 and connect it to the router. enabled dhcp & it works fine, but other pc on the LAN couldn't access the internet eventhough could access (ping) the router. what is my mistakes? HELP ME

1) routing & interface problem
machine : p4 3.0, 1gb ram, 70gb hdd, eth0, sit0
o/s : suse linux enterprise server 9
adsl router ip : 10.117.212.129/255.255.255.192

currently configured eth0 as 192.168.1.1 and link it to LAN, sit0 as 10.117.212.130 and connect it to the router. but nothing happen to sit0 (no configuration found!). what is sit0 stands for? am i have to put another ethernet adapter (eth1) to connect to the router, so the server can be a router? what should i do? HELP ME

Thanks
 
Old 07-25-2005, 08:01 PM   #2
Worksman
Member
 
Registered: Sep 2004
Location: Romania
Distribution: Ubuntu, Debian, Arch Linux, Gentoo, Slackware
Posts: 171
Blog Entries: 1

Rep: Reputation: 31
I'm not really an expert but i had a simmilar problem (cable modem). Is that router your ISP's router? The adsl router ip is not routable. 192.168..x.x are not routable ips. my cable modem has a simmilar ip 192.168.100.1 but it 's only used to configure the modem or see stats using http://192.168.100.1. You could try with your current config http://192.168.0.1/. Actually the router must have an ip assigned by the isp (by dhcp). All your computers cant access the web? If so i think thats your problem. Find your real router ip (the routable one). Even then i still think you need your isp toregister your macs but i'm going to far. I'm really a newbie but i had a simmilar problem, hope i helped.
 
Old 07-25-2005, 08:43 PM   #3
databox
LQ Newbie
 
Registered: Jul 2005
Distribution: novel suse linux enterprise server 9
Posts: 18

Original Poster
Rep: Reputation: 0
thanks but it still don't solve my probs

the adsl router is mine, not the isp's.

Last edited by databox; 07-25-2005 at 08:47 PM.
 
Old 07-25-2005, 11:03 PM   #4
mpeg4codec
Member
 
Registered: Jul 2005
Distribution: Debian, Gentoo, self-built [not LFS]
Posts: 109

Rep: Reputation: 15
Firstly, the sit0 interface is an internal interface used by Linux when routing IPv6 over IPv4. Unless you're using IPv6, you should run:

ip link set sit0 down
ip addr del 10.117.212.130/26

Now, on the Linux machine, you have to run

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -i eth0 -s 192.168.1.0/24 -t nat -A POSTROUTING -j MASQUERADE

Let me know if that helps. It was kind of hard to understand what you were asking for, so if you clarify I can be of more service.
 
Old 08-22-2005, 03:54 AM   #5
databox
LQ Newbie
 
Registered: Jul 2005
Distribution: novel suse linux enterprise server 9
Posts: 18

Original Poster
Rep: Reputation: 0
<<Firstly, the sit0 interface is an internal interface used by Linux when routing IPv6 over IPv4. Unless you're using IPv6, you should run:

ip link set sit0 down
ip addr del 10.117.212.130/26

Now, on the Linux machine, you have to run

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -i eth0 -s 192.168.1.0/24 -t nat -A POSTROUTING -j MASQUERADE

Let me know if that helps. It was kind of hard to understand what you were asking for, so if you clarify I can be of more service.>>

thanks for the reply. so, sit0 is an internal interface, right? means i cannot use it to connect to the router? so, if i want to make the sles 9 server as an internet gateway to my entire LAN, i have to put another ethernet adapter?

router (192.168.0.1)--->eth0 (192.168.0.2/sles 9 server)
switch---------------------->eth1 (10.117.206.10/sles 9 server)
switch---------------------->LAN (10.117.206-10.117.206.50/clients)

i'm so sorry if i make you headache. i'm a newbie and this is the only place i can learn and ask for a favour. if you don't mind, you can contact me at databox3@yahoo.com. thanks

regards;
 
Old 08-22-2005, 07:57 AM   #6
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 676
Blog Entries: 7

Rep: Reputation: 32
Why dont you download firestarter ......its a GUI firewall that can help you alot in your configuration download it install it disable your built in firewall first and give it a try.........I found it to be very usefull with newbies and it could easily resolve your probs
 
Old 08-22-2005, 08:24 AM   #7
databox
LQ Newbie
 
Registered: Jul 2005
Distribution: novel suse linux enterprise server 9
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by ALInux
Why dont you download firestarter ......its a GUI firewall that can help you alot in your configuration download it install it disable your built in firewall first and give it a try.........I found it to be very usefull with newbies and it could easily resolve your probs
thanks a lot for the info. i'll try it someday. but what i'm thinking now, my greatest probs is with the sit0 configuration, did i?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux box as a router cambie Linux - Networking 4 11-21-2004 10:01 AM
linux box as router cambie Linux - Networking 10 11-16-2004 12:20 AM
Using Linux Box as a Router wasabi Linux - Networking 5 09-04-2003 05:08 PM
Linux box as a router dumpa Linux - Newbie 8 08-08-2003 04:05 PM
Linux box as router AkumaLoka Linux - Networking 3 10-14-2002 04:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration