Results 1 to 5 of 5

Thread: Gateway before router

Hybrid View

  1. #1
    Associate
    Join Date
    Sep 2003
    Posts
    25

    Gateway before router

    I'm trying to set up a gateway before my router, so it's between my modem and router. I've got it working with the external card, the one that's connected to the modem so I can acces the net from the linux gateway. The problem accures when I connect the other network card from the gateway to my routers WAN port. Both router and the second card in the gateway connected to the router have static ip's. But I can't ping the gateway from my router nor access the net. What have I done wrong?

  2. #2
    Guest

    Re:Gateway before router

    Do you have your routes set up correctly in the gateway? If you can ping your second card from the router and vice versa, and you can ping the net from your first card, it sounds like you need to add a default gateway with the route command.

  3. #3
    Associate
    Join Date
    Sep 2003
    Posts
    25

    Re:Gateway before router

    I'm not exactly sure of how to do this but is it something lik this;
    route add default gw XXX.XXX.XXX.XXX dev eth0
    route add -net XXX.XXX.XXX.0 netmask 255.255.255.0 gw XXX.XXX.XXX.XXX dev eth0

    Where XXX.XXX.XXX.XXX is the gateway to the internet

    But still there's no connection between the router and the gateway..

  4. #4

    Re:Gateway before router

    Here's an example of how you want the routes setup:

    Gateway LAN:

    ifconfig 192.168.10.1

    The routes to 192.168.10.0/24 shoudl be automatically added, and the default should be set by whatever you are using for your connection.

    Router WAN:

    192.168.10.2

    Router LAN:

    192.168.11.1

    Host:

    ifconfig 192.168.11.2
    route add default gw 192.168.11.1

    Some routers don't like to play nice with two nets, but if you have both the router WAN and LAN set the same, it gets confused as to where to look for hosts on the network set.

  5. #5
    Associate
    Join Date
    Sep 2003
    Posts
    25

    Re:Gateway before router

    Got it working now
    I used iptables and connected the gateway to the routers lan port instead of the wan

Similar Threads

  1. Unorthodox Network Setup: Ubuntu Gateway, Wireless Router, PCs
    By MRod in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 12-20-2007, 09:08 AM
  2. Suse 10.2 as gateway
    By mahendraparanjpe in forum Suse
    Replies: 1
    Last Post: 03-04-2007, 02:37 PM
  3. OpenBSD gateway
    By Mor_gath in forum BSD
    Replies: 10
    Last Post: 08-20-2002, 09:49 PM
  4. Gateway PET?
    By BurntAsh in forum Linux - General Topics
    Replies: 6
    Last Post: 07-24-2002, 04:16 PM
  5. Question on setting router or gateway
    By wing328 in forum Linux - Hardware, Networking & Security
    Replies: 5
    Last Post: 06-11-2002, 08:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •