Find the answer to your Linux question:
Results 1 to 3 of 3
ok so i dug out an old computer i no longer use and installed 2 nics and a dvd rom i had lying around. so i want to setup this ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Posts
    13

    slackware server


    ok so i dug out an old computer i no longer use and installed 2 nics and a dvd rom i had lying around.

    so i want to setup this computer with slackware and run it as a server.

    I have been using slackware as my desktop os for a while so i know my way around but im no expert.

    What i want is my router connected to this server computer and then setup my desktop computer to connect to the internet and network through it.

    Does anyone have any advice or know what i need to setup specifically.

    also when i install slackware on this computer whats the best way to install it so i can easily upgrade when a new version of slackware is out.

    any help appreciated thanks.

  2. #2
    Just Joined! volomir's Avatar
    Join Date
    Jul 2006
    Location
    romania
    Posts
    20
    hello, if you want to use that old pc as a router, you don't need to do a full install of slackware, just install the things you need

    sharing your internet connection is quite simple, you just have to type these 2 lines

    echo "1" > /proc/sys/net/ipv4/ip_forward

    this activates ip forwarding

    iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

    this line shares the internet connection to all that ip class ( 192.168.0.0/24 ), and the interface that you receive internet from is eth0, while eth1 will be the nic that you will setup the gateway for your network 192.168.0.1 for example

    on your desktop assign an ip from that class, let's say 192.168.0.2
    if you use linux, don't forget to add the new route, after you previosly deleted the old route

    route dell defaul gw
    route add default gw 192.168.0.1

    for dns servers, just use the ones you use on your router

    cheers

  3. #3
    Just Joined!
    Join Date
    Apr 2005
    Posts
    13
    i tried setting it up but its not working, I got the internet running on my server box now using 192.168.0.2 but i want to share this internet through the second nic, so i can setup a desktop computer using ip 192.168.0.12

    i ran the above commands u said and they didnt give any errors.

    The desktop pc i use:
    ip = 192.168.0.12
    subnetmask = 255.255.255.0
    and the gateway set to the server? = 192.168.0.2

    my rc.inet1.conf says:

    # Config information for eth0:
    IPADDR[0]="192.168.0.2"
    NETMASK[0]="255.255.255.0"
    USE_DHCP[0]=""
    DHCP_HOSTNAME[0]=""

    # Config information for eth1:
    IFNAME[1]="eth0:1"
    IPADDR[1]="192.168.0.12"
    NETMASK[1]="255.255.255.0"
    USE_DHCP[1]=""
    DHCP_HOSTNAME[1]=""

    # Config information for eth2:
    IPADDR[2]=""
    NETMASK[2]=""
    USE_DHCP[2]=""
    DHCP_HOSTNAME[2]=""

    # Config information for eth3:
    IPADDR[3]=""
    NETMASK[3]=""
    USE_DHCP[3]=""
    DHCP_HOSTNAME[3]=""

    # Default gateway IP address:
    GATEWAY="192.168.0.1"




    this is what ifconfig said:

    eth0 Link encap:Ethernet HWaddr 00:06:4F:4E:4B:9D
    inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
    inet6 addr: fe80::206:4fff:fe4e:4b9d/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:242 errors:0 dropped:0 overruns:0 frame:0
    TX packets:239 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:135332 (132.1 KiB) TX bytes:26970 (26.3 KiB)
    Interrupt:9 Base address:0x6000

    eth0:1 Link encap:Ethernet HWaddr 00:06:4F:4E:4B:9D
    inet addr:192.168.0.12 Bcast:192.168.0.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    Interrupt:9 Base address:0x6000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:1003 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1003 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:85118 (83.1 KiB) TX bytes:85118 (83.1 KiB)

  4. $spacer_open
    $spacer_close

Posting Permissions

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