Skip to contentSkip to conversation

Router

LARTC Rimas 4 participants 4 messages Nov 22, 2002

lore
Share & tools
lore

Rimas

author
#0 lore raw

Hi guys,

I'm asking the same question again (it's very urgent for me).

How to build a router on Linux box?

I have a Linux box (Redhat 7.3) with two network cards.
eth0 is connection to my wireless ISP and eth1 to my FWs.
I want to route eth0<-->eht1. Both NIC have real Internet IP as well like FWs.
I need no NAT (no needs to hide my real IP, because it have to be seen from Internet).
Do I have to use ip route or iptables or combination of it.

Thank you

Rimas

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 2 lines

How to build a router on Linux box?

This is a bit like asking 'How do I build a nuclear reactor, I need to have it done by monday' :)

You will need to sit down and do quite a bit of reading. There are howto documents, there are books on the subject, there are mailing lists like this. You'll need to spend time with all three types of information source.

The book "Linux Firewalls", despite the title, is a good source of informaiton on routing with Linux.

The book "Linux Routing" is also good.

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#2 lore raw
In reply to Rimas
Quoted 6 lines · Rimas

Hi guys,

I'm asking the same question again (it's very urgent for me).

How to build a router on Linux box?

Quoted 7 lines

I have a Linux box (Redhat 7.3) with two network cards.
eth0 is connection to my wireless ISP and eth1 to my FWs.
I want to route eth0<-->eht1. Both NIC have real Internet IP as well like FWs.
I need no NAT (no needs to hide my real IP, because it have to be seen from Internet).
Do I have to use ip route or iptables or combination of it.

If the box is up and running with 2 nic's configured, try this :

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

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#3 lore raw
In reply to Rimas
Quoted 5 lines · Stef Coene
Quoted 4 lines · Rimas

Hi guys,

I'm asking the same question again (it's very urgent for me).

Quoted 7 lines
Quoted 7 lines

How to build a router on Linux box?

I have a Linux box (Redhat 7.3) with two network cards.
eth0 is connection to my wireless ISP and eth1 to my FWs.
I want to route eth0<-->eht1. Both NIC have real Internet IP as well like FWs.
I need no NAT (no needs to hide my real IP, because it have to be seen

from

Quoted 8 lines
Quoted 2 lines

Internet).
Do I have to use ip route or iptables or combination of it.

If the box is up and running with 2 nic's configured, try this :

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

Stef

Just to enable routing (without any firewall stuff) the above command would be sufficient. To make it permanent, add the following to /etc/sysctl.conf:
# Enables packet forwarding
net.ipv4.ip_forward=1

You could also add the following to enable route verification:
# Enables source route verification net.ipv4.conf.default.rp_filter = 1

Thanks,
Ashok
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/