ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    IP Forwarding for Internet Access from one machine to another

    IT Discussion
    3
    13
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LakshmanaL
      Lakshmana
      last edited by

      I am having two machines .
      1st Machine:
      Ubuntu Server installed with Internet Access
      Having two NIC ports and having one external IP(162.16.1.6) and one internal IP(162.17.1.150)
      External IP has internet access and internet IP is the gateway of the 2nd server.
      I have internet from the External IP of machine1

      2nd Machine:
      Ubuntu Server installed without Internet Access
      Having one NIC ports with one IP(162.17.1.151) in the segment.

      I need to provide internet from the 1st machine to second machine.

      How to do this method by only having IP tables?

      1 Reply Last reply Reply Quote 1
      • coliverC
        coliver
        last edited by coliver

        You need to create a bridge on the 1st machine. Here is some Ubuntu documentation... I don't think you can do this with just IPTables.

        https://help.ubuntu.com/community/NetworkConnectionBridge

        1 Reply Last reply Reply Quote 1
        • LakshmanaL
          Lakshmana
          last edited by

          I have already done in my server with nic bonding for the purpose increasing the speed of internet but whether it is possible to have the bridging the servers after using the NIC bonding

          coliverC 1 Reply Last reply Reply Quote 0
          • coliverC
            coliver @Lakshmana
            last edited by

            @Lakshmana said:

            I have already done in my server with nic bonding for the purpose increasing the speed of internet but whether it is possible to have the bridging the servers after using the NIC bonding

            No... that doesn't really make sense does it? Bonding your NICs makes them "one" interface so you wouldn't be able to bridge between the two.

            scottalanmillerS 1 Reply Last reply Reply Quote 1
            • scottalanmillerS
              scottalanmiller @coliver
              last edited by

              @coliver said:

              @Lakshmana said:

              I have already done in my server with nic bonding for the purpose increasing the speed of internet but whether it is possible to have the bridging the servers after using the NIC bonding

              No... that doesn't really make sense does it? Bonding your NICs makes them "one" interface so you wouldn't be able to bridge between the two.

              He is correct, bonding / teaming makes bridging impossible.

              1 Reply Last reply Reply Quote 0
              • LakshmanaL
                Lakshmana
                last edited by

                i dont want to bridge now.
                i need to forward the ip for the server

                scottalanmillerS 1 Reply Last reply Reply Quote 0
                • scottalanmillerS
                  scottalanmiller @Lakshmana
                  last edited by

                  @Lakshmana said:

                  i dont want to bridge now.
                  i need to forward the ip for the server

                  That would be port forwarding on the router / firewall.

                  1 Reply Last reply Reply Quote 0
                  • LakshmanaL
                    Lakshmana
                    last edited by

                    there is no router present,i need to make my ubuntu server as a router here

                    coliverC 1 Reply Last reply Reply Quote 0
                    • coliverC
                      coliver @Lakshmana
                      last edited by

                      @Lakshmana said:

                      there is no router present,i need to make my ubuntu server as a router here

                      So you do need bridging?

                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                      • LakshmanaL
                        Lakshmana
                        last edited by

                        My scenario here is the master server has three nic ports(A,B,C) with two nic ports(A,B) are bonded and now the nic port(C) is not bonded.

                        The internet is coming from the nic port C and the nic port A,B are connected with 192 series IP which is communicating with the slave servers .

                        The slave servers have two NIC ports(A,B)which are also bonded and it has the IP in 192 series.

                        Now the internet from the NIC ports C of the master server has to be provided to the slave servers and the slave server should have the internet.

                        coliverC 1 Reply Last reply Reply Quote 0
                        • coliverC
                          coliver @Lakshmana
                          last edited by

                          @Lakshmana said:

                          My scenario here is the master server has three nic ports(A,B,C) with two nic ports(A,B) are bonded and now the nic port(C) is not bonded.

                          The internet is coming from the nic port C and the nic port A,B are connected with 192 series IP which is communicating with the slave servers .

                          The slave servers have two NIC ports(A,B)which are also bonded and it has the IP in 192 series.

                          Now the internet from the NIC ports C of the master server has to be provided to the slave servers and the slave server should have the internet.

                          You will still need a bridge between port AB and C. Here is some info from Ubuntu. https://help.ubuntu.com/community/Router

                          1 Reply Last reply Reply Quote 0
                          • LakshmanaL
                            Lakshmana
                            last edited by

                            I have already used the iptables to configured by this command after
                            nano /etc/sysctl.conf
                            Enabled the IP forwarding and tried
                            sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

                            In my test machine worked properly but at the server it does not working properly.

                            1 Reply Last reply Reply Quote 0
                            • scottalanmillerS
                              scottalanmiller @coliver
                              last edited by

                              @coliver said:

                              @Lakshmana said:

                              there is no router present,i need to make my ubuntu server as a router here

                              So you do need bridging?

                              Bridging and routing are different things. One is layer 2 and one is layer 3. But neither will work if he bonds the NICs.

                              1 Reply Last reply Reply Quote 0
                              • 1 / 1
                              • First post
                                Last post