Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Networking and Name Resolution
Results 1 to 5 of 5

Thread: Networking and Name Resolution

  1. #1

    Networking and Name Resolution

    I have set up a home lan with two Gentoo boxes, GentooA & GentooB.

    GentooA ifconfig shows the following:

    eth0 Link encap:Ethernet HWaddr 00:0X:XX:XX:XX:XX
    inet addr:24.136.XXX.XXX Bcast:255.255.255.255 Mask:255.255.255.192
    UP BROADCAST NOTRAILERS RUNNING MTU:1500 Metric:1
    RX packets:10578 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1040 errors:0 dropped:0 overruns:0 carrier:0
    collisions:29 txqueuelen:100
    RX bytes:1237892 (1.1 Mb) TX bytes:152877 (149.2 Kb)
    Interrupt:5 Base address:0xd800

    eth1 Link encap:Ethernet HWaddr 00:XX:XX:XX:XX:XX
    inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:829 errors:1 dropped:0 overruns:0 frame:0
    TX packets:923 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:177559 (173.3 Kb) TX bytes:803436 (784.6 Kb)
    Interrupt:5 Base address:0xd000

    GentooB ifconfig shows this:

    eth0 Link encap:Ethernet HWaddr 00:XX:XX:XX:XX:XX
    inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:829 errors:1 dropped:0 overruns:0 frame:0
    TX packets:923 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:177559 (173.3 Kb) TX bytes:803436 (784.6 Kb)
    Interrupt:5 Base address:0xd000

    GentooA route gives the following:

    Destination Gateway Genmask Flags Metric Ref Use Iface
    user-XXXXX.ca * 255.255.255.192 U 0 0 0 eth0
    192.168.0.0 * 255.255.255.0 U 0 0 0 eth1
    default user-XXXXX.ca 0.0.0.0 UG 0 0 0 eth0
    default 192.168.0.1 0.0.0.0 UG 1 0 0 eth1

    GentooB route shows this:
    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.0.0 * 255.255.255.0 U 0 0 0 eth0

    -------------------------------------------------------------------------------------------

    Either machine can ping the other with no probs. The problem is name resolution does not occur from GentooB, whether surfing the net or "emerge rsync." I have temporarily fixed web surfing by allowing GentooB to access the squid proxy on GentooA, so I can surf the net. How do I correct the networking so that I can browse without a proxy and emerge can access the internet from GentooB?

    Any help is greatly appreciated.








  2. #2

    Re:Networking and Name Resolution

    you need a firewall, heres a quick one to get the job done:
    Code:
    iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/255 -j SNAT --to 24.136.XXX.XXX
    iptables -A FORWARD -i eth0 -m state --state NEW,INVALID -j DROP
    iptables -A FORWARD -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
    iptables -A FORWARD -i eth1 -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT

  3. #3

    Re:Networking and Name Resolution

    [quote author=gorn link=board=4;threadid=5937;start=0#56623 date=1040766970]
    you need a firewall, heres a quick one to get the job done:
    [/quote]

    I had assumed that firestarter turned on ip forwarding, since it asks for input on both the net connection (eth0), as well as the lan connection (eth1). I have the same problem whether I use firestarter or not. Should I therefore assume that firestarter does not turn on ip forwarding?

  4. #4
    Senior Member
    Join Date
    May 2001
    Posts
    345

    Re:Networking and Name Resolution

    Firestarter probably did, so I'm assuming it did for the rest..

    Your routing table on box B doesn't seem to have a default route set.. Mine looks like

    Destination Gateway Genmask Flags Metric Ref Use Iface
    192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
    0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0

    Destination 0.0.0.0 = any.. Your machine only has one routing rule on GentooB, and that just tells it how to access it's own network. To set a default route

    "route add default gw 192.168.0.1" (Most distributions seem to have a network script somewhere to store this sort of thing, not sure where it is on gentoo -- you could just add that to a startup script.)

    Then, you should be able to browse the net by IP at the least..

    http://216.239.35.100/ sorta stuff.

    If that works, but going by hostname doesn't then you need to fix DNS.

    Get your DNS IP numbers, and add them to /etc/resolv.conf (each entry on it's own line like ...)

    "nameserver 400.500.400.500" (replacing the 400.500.4... with your DNS IP's) To make everything simple on my LAN I run a caching DNS server on my firewall box (only accessible from internal LAN, firewalled from the internet.) Then, I just setup everything to use 192.168.0.1 as my default gateway, and 192.168.0.1 as my DNS.

  5. #5

    Re:Networking and Name Resolution

    [quote author=vvx link=board=4;threadid=5937;start=0#56637 date=1040772269]
    Your routing table on box B doesn't seem to have a default route set.
    [/quote]

    BINGO!! I added the default route and now everything works. Gentoo has startup script (/etc/conf.d/net) to name the default gateway at bootup so everything just works.

    Thanks to everyone for all suggestions. Now on to set up network printing with cups and then the openMosix cluster.

Similar Threads

  1. Resolution for XWindows
    By in forum Linux - Software, Applications & Programming
    Replies: 9
    Last Post: 10-06-2003, 03:39 PM
  2. Resolution Issues
    By pjt in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 02-24-2003, 02:25 AM
  3. Resolution help
    By mcdougrs in forum Linux - Software, Applications & Programming
    Replies: 11
    Last Post: 11-03-2002, 07:22 AM
  4. Screen resolution
    By babbing in forum Redhat / Fedora
    Replies: 16
    Last Post: 06-12-2002, 07:01 AM
  5. Resolution too high in X
    By ASCI_Blue in forum Linux - Software, Applications & Programming
    Replies: 14
    Last Post: 12-12-2001, 11:03 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
  •