Can't connect local network to internet.
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2012
    Location
    Hopatcong, NJ USA
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Can't connect local network to internet.

    I have been doing this for years, but was using a very old (Redhat 9!) system for the gatewey. As it's failing, I'm trying to configure an F17 system for the same purpose.

    Where I'm stuck:
    System A has 2 interfaces. I have disabled NetworkManager as it complicated things too much.

    Outside world interface: (/etc/sysconfig/network-scripts/ifcfg-p3p1)

    UUID="347ac2ad-0fc9-4170-a215-8bd9a1cfa5e1"
    NM_CONTROLLED="no"
    BOOTPROTO="dhcp"
    DEVICE="p3p1"
    ONBOOT=yes
    TYPE=Ethernet
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=no
    NAME="System p3p1"
    HWADDR=00:80: C6:EF:F5:5E
    PEERDNS=yes
    PEERROUTES=yes

    Local interface: (/etc/sysconfig/network-scripts/ifcfg-p2p1)

    UUID="fc6b706e-0023-4157-a64a-1424ad4589e2"
    NM_CONTROLLED="no"
    BOOTPROTO=none
    DEVICE="p2p1"
    ONBOOT=yes
    TYPE=Ethernet
    IPADDR0=192.168.1.8
    PREFIX0=27
    GATEWAY0=192.168.2.1
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=no
    NAME="System p2p1"
    HWADDR=00:80: C6:FB:3E:9B

    On system A, I can ping outside systems, such as an ISP I use, and can also ping the local system. B (also F17).

    B has one interface, ip addr 192.168.1.12, and can ping A, but cannot ping any outside system.

    I have set default routing on B to system A (192.168.1.8) and "route" shows it to be set correctly.

    On A, I did echo 1 >/proc/sys/net/ipv4/ip_forward.

    Still, B cannot ping outside systems. Perhaps there are one or more things I'm not thinking of

    Attempts on B to ping an outside host return "connect: Network is unreachable"

    Any suggestions would be appreciated.

    Thanks, Hal
    Last edited by halmorris; 13th October 2012 at 03:14 AM. Reason: Accidental "smilies"

  2. #2
    Join Date
    Aug 2009
    Location
    Waldorf, Maryland
    Posts
    7,345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Can't connect local network to internet.

    It depends on system A.

    Forwarding works, but only if the interface works on the router. It is possible the router will only accept one network, and can't handle the forwarded packet. If that is the case then you have to use NAT to fully translate the incoming packet...

    Now this assumes the network is router --> System A -->System B. System A would have NAT the connection to System B.

  3. #3
    Yellowman Guest

    Re: Can't connect local network to internet.

    Quote Originally Posted by halmorris
    I have been doing this for years, but was using a very old (Redhat 9!) system for the gatewey. As it's failing, I'm trying to configure an F17 system for the same purpose.

    Where I'm stuck:
    System A has 2 interfaces. I have disabled NetworkManager as it complicated things too much.

    Outside world interface: (/etc/sysconfig/network-scripts/ifcfg-p3p1)

    UUID="347ac2ad-0fc9-4170-a215-8bd9a1cfa5e1"
    NM_CONTROLLED="no"
    BOOTPROTO="dhcp"
    DEVICE="p3p1"
    ONBOOT=yes
    TYPE=Ethernet
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=no
    NAME="System p3p1"
    HWADDR=00:80: C6:EF:F5:5E
    PEERDNS=yes
    PEERROUTES=yes

    Local interface: (/etc/sysconfig/network-scripts/ifcfg-p2p1)

    UUID="fc6b706e-0023-4157-a64a-1424ad4589e2"
    NM_CONTROLLED="no"
    BOOTPROTO=none
    DEVICE="p2p1"
    ONBOOT=yes
    TYPE=Ethernet
    IPADDR0=192.168.1.8
    PREFIX0=27
    GATEWAY0=192.168.2.1
    DEFROUTE=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=no
    NAME="System p2p1"
    HWADDR=00:80: C6:FB:3E:9B

    On system A, I can ping outside systems, such as an ISP I use, and can also ping the local system. B (also F17).

    B has one interface, ip addr 192.168.1.12, and can ping A, but cannot ping any outside system.

    I have set default routing on B to system A (192.168.1.8) and "route" shows it to be set correctly.

    On A, I did echo 1 >/proc/sys/net/ipv4/ip_forward.

    Still, B cannot ping outside systems. Perhaps there are one or more things I'm not thinking of

    Attempts on B to ping an outside host return "connect: Network is unreachable"

    Any suggestions would be appreciated.

    Thanks, Hal
    Don't you need netmask?

    Code:
    [leigh@main-pc Desktop]$ cat /etc/sysconfig/network-scripts/ifcfg-p10p1
    UUID="b9f51cf8-3cee-40cc-85ff-914c09be26b9"
    NM_CONTROLLED=yes
    BOOTPROTO=none
    ONBOOT=yes
    HWADDR=6C:F0:49:B8:54:E1
    TYPE=Ethernet
    DEFROUTE=yes
    PEERROUTES=yes
    IPV4_FAILURE_FATAL=no
    IPV6INIT=no
    NAME="System p10p1"
    IPADDR=192.168.1.64
    NETMASK=255.255.255.0
    DNS3=208.67.222.220
    DNS2=192.168.1.254
    GATEWAY=192.168.1.254
    DNS1=8.8.8.8
    MTU=1500
    USERCTL=no
    PREFIX=24

  4. #4
    Join Date
    Oct 2005
    Location
    Southern Ontario
    Age
    70
    Posts
    200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Can't connect local network to internet.

    I have basically the same setup, but can't get the 'routing' and dhcp servers setup.

    On my system A, with two enet interfaces (enet0 and enet1), enet0 is connected to an external router in the 'normal' manner with a static ip in subnet 192.168.1.0/24.
    Then I added enet1 on new subnet 10.0.0.0/24 and static IP 10.0.0.2 and wired directly (via bridge) to system B with a single enet interface, wanting to use dhcp.

    So I need to have system A provide dhcp service, but only across enet1 for subnet 10.0.0.0/24.
    I also need to have system A route bothways between enet0 and enet1. How do I do this??
    I have dnsmasq installed.
    Martyn Griffin

  5. #5
    Join Date
    Aug 2009
    Location
    Waldorf, Maryland
    Posts
    7,345
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Can't connect local network to internet.

    You can try setting the forward flag in the /etc/sysctl.conf file on system A. It is by default disabled. The parameter is "net.ipv4.ip_forward".

    You can test this by just "echo 1 >/proc/sys/net/ipv4/ip_forward" as root, and it should start working.

    SOMETIMES, it seems that NetworkManager has other ideas. If it turns it off, disable network manager and enable network, and make sure all network startup scripts have "NM_CONTROLLED=no".
    Last edited by jpollard; 16th October 2012 at 04:33 PM. Reason: forgot "system A"

Similar Threads

  1. Cannot connect to local computers but can to internet
    By PoppaB in forum Servers & Networking
    Replies: 1
    Last Post: 28th September 2009, 09:02 PM
  2. can connect to wireless router, but no internet or local network
    By HellGuardian in forum Servers & Networking
    Replies: 11
    Last Post: 4th November 2008, 08:29 PM
  3. Use a name instead of IP address to connect from local network
    By cfoland in forum Servers & Networking
    Replies: 14
    Last Post: 21st July 2006, 03:14 PM
  4. Samba seems to be using internet instead of local network... :(
    By netloss in forum Servers & Networking
    Replies: 3
    Last Post: 19th October 2004, 05:13 AM

Tags for this Thread

Posting Permissions

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