Networking Forums

Networking Forums > Computer Networking > Linux Networking > linux behind linksys - configuration of server

Reply
Thread Tools Display Modes

linux behind linksys - configuration of server

 
 
k1mgy
Guest
Posts: n/a

 
      12-22-2003, 09:39 PM
I've just set up my first Linux box (Red Hat 9, as a workstation),
however in the setup i chose to also install sendmail.

The system is rather simple. A Linksys BEFSR41 router/switch sits
between the ADSL modem and the inside. It is providing DNS to the class
C clients (have 4 machines currently, 3 of them windows).

One of the windows machines is assigned to a static IP: 192.168.1.110
The linux machine is currently set as follows:

eth0:
static ip 192.168.1.120
subnet mask 255.255.255.0
gateway 192.168.1.2 (I changed this from the default
router assress 192.168.1.1)
Static net routes: blank

DNS is set as:
hostname: blank
primary dns: 192.168.1.2
secondary dns: 192.168.1.2
tertiery: blank
dns search blank

The linux machine name is linuxhost

If i ping localhost, i get 127.0.0.1
If i ping the machine name, i get 127.0.0.1

Questions:

1. If i set the machine i/p to 192.168.1.120, why do i get 127.0.0.1
(the loopback ip) instead? Shouldn't i see the .120 address? I can
ping it directly and it works.

Here's the routing table:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default 192.168.1.2 0.0.0.0 UG 0 0 0 eth0

Here's the ifconfig:

[root@linuxhost root]# ifconfig
eth0 Link encap:Ethernet HWaddr 000:B7:06:69:F7
inet addr:192.168.1.120 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5936 errors:0 dropped:0 overruns:0 frame:0
TX packets:4696 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:4913264 (4.6 Mb) TX bytes:841580 (821.8 Kb)
Interrupt:11 Base address:0x7c00 Memory:ed100000-ed100038

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:115 errors:0 dropped:0 overruns:0 frame:0
TX packets:115 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9928 (9.6 Kb) TX bytes:9928 (9.6 Kb)


2. I want to leave the limksys router as it is (the linux machine won't
be running all the time, although having it do dns is attractive). In
my configuration, is it possible to establish a private domain name? I
would like to use k1mgy.com How can this be accomplished? Do i need a DNS
nameserver running on the linux box to do this, or can i establish some static
routing?

3. With the private domain name, I'd like my linux hox to host sendmail as an
inside mail server (mail.k1mgy.com). As such, I'd like sendmail to retrieve
mail from a remote (Internet side of router) POP mailbox and hold it for
internal delivery to a certain INSIDE address ((E-Mail Removed)).

If it is not possible for sendmail to get mail on a POP mailbox, I'd like to be
able to forward mail (from outlook on a local machine on the inside) to the
mail.k1mgy.com sendmail host. Therefore I am hoping it will be possible to
establish an account in outlook the same way i would for any pop/smtp server on
the outside. I suspect some static route would have to be established in
outlook's email server setting for the particular account, or maybe i'd have to
reference it directly by i/p? That's OK.

Actually, doing both (sendmail getting mail from an outside server and sendmail
hosting for inside client/s) would be nice.


I am hoping that the information I've given is clear and sufficient. I've read
many other requests here and i have found the narrative approach to be a bit
difficult to understand, so i hope that tabular is better.

As everyone can tell, i am new to linux (not to windows) and a little weak on my
TCP/IP and DNS.

Hopefully the good answers here will also help others.

Thanks everyone.

Mark

 
Reply With Quote
 
 
 
 
Matthew
Guest
Posts: n/a

 
      12-23-2003, 06:35 AM

> Questions:
>
> 1. If i set the machine i/p to 192.168.1.120, why do i get 127.0.0.1
> (the loopback ip) instead? Shouldn't i see the .120 address? I can
> ping it directly and it works.
>
> Here's the routing table:
>
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use Iface
> 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
> 169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
> 127.0.0.0 * 255.0.0.0 U 0 0 0 lo
> default 192.168.1.2 0.0.0.0 UG 0 0 0 eth0
>
> Here's the ifconfig:
>
> [root@linuxhost root]# ifconfig
> eth0 Link encap:Ethernet HWaddr 000:B7:06:69:F7
> inet addr:192.168.1.120 Bcast:192.168.1.255 Mask:255.255.255.0
> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
> RX packets:5936 errors:0 dropped:0 overruns:0 frame:0
> TX packets:4696 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:100
> RX bytes:4913264 (4.6 Mb) TX bytes:841580 (821.8 Kb)
> Interrupt:11 Base address:0x7c00 Memory:ed100000-ed100038
>
> lo Link encap:Local Loopback
> inet addr:127.0.0.1 Mask:255.0.0.0
> UP LOOPBACK RUNNING MTU:16436 Metric:1
> RX packets:115 errors:0 dropped:0 overruns:0 frame:0
> TX packets:115 errors:0 dropped:0 overruns:0 carrier:0
> collisions:0 txqueuelen:0
> RX bytes:9928 (9.6 Kb) TX bytes:9928 (9.6 Kb)
>
>
> 2. I want to leave the limksys router as it is (the linux machine won't
> be running all the time, although having it do dns is attractive). In
> my configuration, is it possible to establish a private domain name? I
> would like to use k1mgy.com How can this be accomplished? Do i need a
> DNS nameserver running on the linux box to do this, or can i establish
> some static routing?
>
> 3. With the private domain name, I'd like my linux hox to host sendmail
> as an inside mail server (mail.k1mgy.com). As such, I'd like sendmail
> to retrieve mail from a remote (Internet side of router) POP mailbox and
> hold it for internal delivery to a certain INSIDE address
> ((E-Mail Removed)).
>
> If it is not possible for sendmail to get mail on a POP mailbox, I'd
> like to be able to forward mail (from outlook on a local machine on the
> inside) to the mail.k1mgy.com sendmail host. Therefore I am hoping it
> will be possible to establish an account in outlook the same way i would
> for any pop/smtp server on the outside. I suspect some static route
> would have to be established in outlook's email server setting for the
> particular account, or maybe i'd have to reference it directly by i/p?
> That's OK.
>
> Actually, doing both (sendmail getting mail from an outside server and
> sendmail hosting for inside client/s) would be nice.
>
>
> I am hoping that the information I've given is clear and sufficient.
> I've read many other requests here and i have found the narrative
> approach to be a bit difficult to understand, so i hope that tabular is
> better.
>
> As everyone can tell, i am new to linux (not to windows) and a little
> weak on my TCP/IP and DNS.
>
> Hopefully the good answers here will also help others.
>
> Thanks everyone.
>
> Mark
>

ANSWERS:
1: no, localhost is 127.0.0.1 it's set in the /etc/hosts file that way
to test the protocoll stack. That's standard you can change that,
although i hardly see why
2: with the lynksys router you can only do that if you have a static IP.
if your IP is static then you would have to go to a Domain name
registrar, and buy the name(cheap) and set up dns(most registrars also
have dns for you to use)
there is dynamic dns(dyndns.org) but i dont see any way to use that with
the linksys router. Something to look at.
3: if everything is ok in aswer 2 you just need to make sure you have an
MX record in you dns zone file, whereever you have it hosted. Forward
your ports and have fun, jut keep in mind, if you want a web server as
well linksys routers (ones i've used) will NOT forward port 80 unless
you have a static ip...

Hope this helps.
o yeah, get webmin if you want to administer sendmail, sendmail is a
BEAR and a half, (half bear cuss it's messy) to configure and
administer, and that's if you are good with it. webmin helps a lot.
O YEAH, sendmail does NOT allow you to download mail with pop3. if you
want pop3 access to the server you need to run pop3d.
and make sure you're not running an open relay, look into ssl or pop3
before sendmail.
have fun.
let me know if you have any further questions
Matt

 
Reply With Quote
 
k1mgy
Guest
Posts: n/a

 
      12-23-2003, 01:10 PM
Matthew,

Thanks so much for your reply.

I did a little experimenting and found that I can establish a host (in the host
table, of all places). So i did it.

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 linuxhost localhost.localdomain localhost
192.168.1.120 linuxhost linuxhost.k1mgy.com k1mgy.com


Now from the linux machine (only) i get 192.168.1.120 when i ping either
linuxhost.k1mgy.com or k1mgy.com. However from the other windows machines I am
not routed (there's no DNS). So i guess the workaround for this is to make
manual entries in the windows machines DNS tables?

Or would it be better to run a DNS Nameserver on the limux box just for this
purpose?

You wrote:
> 2: with the lynksys router you can only do that if you have a static IP.
> if your IP is static then you would have to go to a Domain name
> registrar, and buy the name(cheap) and set up dns(most registrars also
> have dns for you to use)
> there is dynamic dns(dyndns.org) but i dont see any way to use that with
> the linksys router. Something to look at.


Yes, inside the network all the machines are static i/p. Outside it doesn't
matter. k1mgy.com is only for use inside (my side of the linksys router).

Maybe you thought from my question that i wanted access to this domain from the
outside. I don't. It's just for testing and some small utility on the inside.

Since I've been able to do this, is it now possible to set up sendmail (i will
look into webmin) such that it will provide the local services i need?

-m-


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web server on a standalone Linux with LinkSys WRT54GL ADSL router ianbrn@gmail.com Linux Networking 8 12-15-2007 10:38 AM
Problems w/ setting up a Linux DMZ Server behind a Linksys Router o.blomqvist@secomintl.com Linux Networking 3 12-13-2004 11:22 PM
Linux/cIPe->Linksys DSL Router->Win2k Server VPN Guy Rouillier Linux Networking 2 11-04-2003 08:05 PM
best networking configuration for router/linux server/windows client ? LoneShadow Linux Networking 4 10-24-2003 05:55 PM
Linksys BEFVP41, linux redhat 7.3 server remote windows xp pro workstation Paul Kraus Linux Networking 1 07-31-2003 03:03 PM



1 2 3 4 5 6 7 8 9 10 11