Results 1 to 6 of 6

Thread: Linux Gateway settings for two NICs on one Box

  1. #1
    Join Date
    Jun 2008
    Location
    Nairobi, Kenya
    Posts
    13

    Linux Gateway settings for two NICs on one Box

    I have a problem with getting some configuration i want.

    I have a Linux box which is running an application on the private LAN with the ip address 172.16.x.x. This NIC has all settings -netmask, broadcast and gateway settings.

    We would like other users to be able to access the same application thro' a public IP - the box has 2 NICs. We have given it a public IP address, 41.203. x. x. we have also assigned it broadcast. netmask and gateway settings.

    currently the application cannot be accessed from outside our network and there are no router rules blocking the access

    My questions are
    1. Is it automatic that applications running on a box on a partcular port can be accessed thro' another 2nd IP of a different NIC on the same box at the same port?
    2. DO we need gateway settings on both NICs?

    trafic doesnt need to flow between the NICs

  2. #2
    Join Date
    Apr 2009
    Posts
    1,107

    Re: Linux Gateway settings for two NICs on one Box

    For your first question it is possible. But for that you need to work on linux networking. It is also possible to configure a gateways on both the NICs. You can assign a single or different gateway which depends on you. Each different gateway assigned will need a different ip network. So here only one thing you must note down that you must address your NICs accordingly.

  3. #3
    Join Date
    Jun 2008
    Location
    Nairobi, Kenya
    Posts
    13

    Re: Linux Gateway settings for two NICs on one Box

    Please explain "you need to work on linux networking"
    There was a proposition that if a box has two NICs, then only one can have gateway settings set. I feel that is when traffic needs to get to the private one and then to the public one then out.
    For our setup, users from outside our network need only to reach the public IP and access the application. The one on the private LAN is working. We are actually working on access from outside our network.

    I have configured the 2nd NIC with the public IP address and the application is running on a port on this server. On the public NIC, does the port 8805 need to be opened?

    Thank you.

  4. #4
    Join Date
    Dec 2007
    Posts
    1,599

    Re: Linux Gateway settings for two NICs on one Box

    I think that to configure the NIC's you will have to edit the files called /etc/sysconfig/network-scripts/ifcfg-eth0 (and eth1 and so forth). Then you will have to fill in the info in each corresponding file for each nic, restart networking, and you should be set. Take it one step at a time. Then first try to get networking setup, then work on configuring the proxy.

  5. #5
    Join Date
    Jun 2008
    Location
    Nairobi, Kenya
    Posts
    13

    Re: Linux Gateway settings for two NICs on one Box

    Quote Originally Posted by expertz View Post
    I think that to configure the NIC's you will have to edit the files called /etc/sysconfig/network-scripts/ifcfg-eth0 (and eth1 and so forth). Then you will have to fill in the info in each corresponding file for each nic, restart networking, and you should be set. Take it one step at a time. Then first try to get networking setup, then work on configuring the proxy.
    I actually have all that set. I edited the ifcfg-eth0 and ifcfg-eth3 files adding in the new gateway,netmask and broadcast addresses. The problem is from outside our network(internet) we cant ping the public IP address. All the NICs have settings for gateways set.

  6. #6
    Join Date
    Jan 2006
    Posts
    4,221

    Re: Linux Gateway settings for two NICs on one Box

    I think that you might also have an odd setup. Therefore, I might suggest a 192.168.1.x (subnet 255.255.255.0) and move out of that subnet for the other lan. 192.168.2.x same subnet. You can control which ISP your PC uses by way of your Default Gateway IP address. Simply remove the Default Gateway IP from your TCP/IP settings.

Similar Threads

  1. Connect Windows Vista through a Linux gateway
    By bicyclingrevolution in forum Technology & Internet
    Replies: 2
    Last Post: 14-07-2011, 08:55 PM
  2. Routing through a gateway in Linux
    By Brexton in forum Networking & Security
    Replies: 3
    Last Post: 27-02-2011, 08:54 AM
  3. Cannot Ping Gateway IP Address on Linux
    By Jagdish Gada in forum Operating Systems
    Replies: 4
    Last Post: 25-02-2009, 09:04 PM
  4. 2 nics only 1 isp can i use both nics to get 200mbps
    By callmeking12 in forum Operating Systems
    Replies: 3
    Last Post: 10-07-2008, 10:22 PM
  5. Router settings shows 0.0.0.0 IP in defaulty gateway
    By WarRen! in forum Windows Vista Network
    Replies: 2
    Last Post: 10-04-2008, 02:17 AM

Tags for this Thread

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
  •  
Page generated in 1,713,442,927.75362 seconds with 17 queries