* [gentoo-server] gentoo router and server on one machine, need help.
@ 2009-11-08 13:03 Tamer Higazi
2009-11-09 8:57 ` Halassy Zoltán
0 siblings, 1 reply; 4+ messages in thread
From: Tamer Higazi @ 2009-11-08 13:03 UTC (permalink / raw
To: gentoo-server
Hi people!
I am not a network pro, therefor I ask you gladly for help. I have a
gentoo box with 2 eth0 cards. I have red the gentoo home router guide at:
http://www.gentoo.org/doc/en/home-router-howto.xml?style=printable
but I need to use the machine as router as well as server itself.
I have 2 NIC in the machine (eth0,eth1). On the machine is asterisk and
apache installed. I want to use the machine a router and server as well.
the sip gateway connected at eth0 is configured as:
192.168.1.5 with it's gateway 192.168.1.1 and nothing goes along to
asterisk.
I guess, it's not possible to have on the same gateway address a service
running. Could you give me some good advise how to get the thing to run?!
# This network configuration was written by net-setup
config_ppp0=("ppp")
link_ppp0="eth1"
plugins_ppp0=("pppoe")
pppd_ppp0=(
"defaultroute"
"usepeerdns"
)
username_ppp0="xxxx"
password_ppp0="xxxx"
config_eth1=("85.183.112.3 broadcast 85.255.255.255 netmask 255.0.0.0")
config_eth0=("192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0")
Tamer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-server] gentoo router and server on one machine, need help.
2009-11-08 13:03 [gentoo-server] gentoo router and server on one machine, need help Tamer Higazi
@ 2009-11-09 8:57 ` Halassy Zoltán
0 siblings, 0 replies; 4+ messages in thread
From: Halassy Zoltán @ 2009-11-09 8:57 UTC (permalink / raw
To: gentoo-server
[-- Attachment #1: Type: text/plain, Size: 901 bytes --]
> I am not a network pro, therefor I ask you gladly for help. I have a
> gentoo box with 2 eth0 cards.
You don't. You have two Ethernet cards maybe.
> config_ppp0=("ppp")
> link_ppp0="eth1"
> plugins_ppp0=("pppoe")
> pppd_ppp0=(
> "defaultroute"
> "usepeerdns"
> )
>
> username_ppp0="xxxx"
> password_ppp0="xxxx"
>
> config_eth1=("85.183.112.3 broadcast 85.255.255.255 netmask 255.0.0.0")
> config_eth0=("192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0")
The main problem here is: Your internet connection is on ppp0, not eth1.
eth1 makes connection with your modem, so IP communication is not
direct, rather tunneled (you don't need an IP configuration therefore on
eth1).
config_eth1=("null")
Also remove the second config_ppp0 line, it overwrites your first one
which you need ( config_ppp0=("ppp") ). You should get your IP address
from your ISP even if it's static.
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 2588 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-server] gentoo router and server on one machine, need help.
@ 2009-11-08 14:56 Tamer Higazi
2009-11-08 15:33 ` LMA1980
0 siblings, 1 reply; 4+ messages in thread
From: Tamer Higazi @ 2009-11-08 14:56 UTC (permalink / raw
To: gentoo-server
Hi people!
I am not a network pro, therefor I ask you gladly for help. I have a
gentoo box with 2 eth0 cards. I have red the gentoo home router guide at:
http://www.gentoo.org/doc/en/home-router-howto.xml?style=printable
but I need to use the machine as router as well as server itself.
I have 2 NIC in the machine (eth0,eth1). On the machine is asterisk and
apache installed. I want to use the machine a router and server as well.
the sip gateway connected at eth0 is configured as:
192.168.1.5 with it's gateway 192.168.1.1 and nothing goes along to
asterisk.
I guess, it's not possible to have on the same gateway address a service
running. Could you give me some good advise how to get the thing to run?!
# This network configuration was written by net-setup
config_ppp0=("ppp")
link_ppp0="eth1"
plugins_ppp0=("pppoe")
pppd_ppp0=(
"defaultroute"
"usepeerdns"
)
username_ppp0="xxxx"
password_ppp0="xxxx"
config_eth1=("85.183.112.3 broadcast 85.255.255.255 netmask 255.0.0.0")
config_eth0=("192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0")
Tamer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-server] gentoo router and server on one machine, need help.
2009-11-08 14:56 Tamer Higazi
@ 2009-11-08 15:33 ` LMA1980
0 siblings, 0 replies; 4+ messages in thread
From: LMA1980 @ 2009-11-08 15:33 UTC (permalink / raw
To: gentoo-server
Hi,
I don't really get the question but I'll try to help you out with logic.
Never did I install asterisk but I did build a test case with apache
and a router on the same box.
First you shall ask what you want to see on eth0 and eth1. On my test
case I wanted to see all port of apache on eth1 (lan) and only port80
on eth0 (wan).
I manage to route all network between lan & wan with simple routing
rules but I did had to build a special case where I wanted to NAT eth0
port80 request to my loopback (lo) where my local apache is listening.
I also NATed eth1 to the lo when explicitly requesting answer from
eth1's IP (more then 1 IP is handy when using chroot or other special
security need).
I guess you'll have to setup proper listening port to asterisk before.
Additionally a little bit of reading (more then some howto) could be
good as securing a router and a server on a same machine is a serious
task (note that it still a not so hard one) that request a good plan.
I had to rethink mine twice before getting the good setup. Test
machine died in a power outage since and didn't got time to build it
back so I can't supply exemple script.
Hope it did help you out.
LMA1980
Le 09-11-08 à 09:56, Tamer Higazi a écrit :
> Hi people!
> I am not a network pro, therefor I ask you gladly for help. I have a
> gentoo box with 2 eth0 cards. I have red the gentoo home router
> guide at:
>
> http://www.gentoo.org/doc/en/home-router-howto.xml?style=printable
>
> but I need to use the machine as router as well as server itself.
>
> I have 2 NIC in the machine (eth0,eth1). On the machine is asterisk
> and
> apache installed. I want to use the machine a router and server as
> well.
>
> the sip gateway connected at eth0 is configured as:
> 192.168.1.5 with it's gateway 192.168.1.1 and nothing goes along to
> asterisk.
>
> I guess, it's not possible to have on the same gateway address a
> service
> running. Could you give me some good advise how to get the thing to
> run?!
>
>
> # This network configuration was written by net-setup
>
> config_ppp0=("ppp")
> link_ppp0="eth1"
> plugins_ppp0=("pppoe")
> pppd_ppp0=(
> "defaultroute"
> "usepeerdns"
> )
>
> username_ppp0="xxxx"
> password_ppp0="xxxx"
>
> config_eth1=("85.183.112.3 broadcast 85.255.255.255 netmask
> 255.0.0.0")
> config_eth0=("192.168.1.1 broadcast 192.168.1.255 netmask
> 255.255.255.0")
>
> Tamer
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-11-09 8:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-08 13:03 [gentoo-server] gentoo router and server on one machine, need help Tamer Higazi
2009-11-09 8:57 ` Halassy Zoltán
-- strict thread matches above, loose matches on Subject: below --
2009-11-08 14:56 Tamer Higazi
2009-11-08 15:33 ` LMA1980
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox