Find the answer to your Linux question:
Results 1 to 2 of 2
my plan for the network is: LAN (10.0.0.0/24) > (eth0: 10.0.0.62) Debian Router (eth1: 172.16.0.62) > modem (172.16.0.1) > internet I have change /proc/sys/net/ipv4/ip_forward from 0 to 1 and Routing ...
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    1

    Post Help me! config debian become to linux box routing

    my plan for the network is:

    LAN (10.0.0.0/24) > (eth0: 10.0.0.62) Debian Router (eth1: 172.16.0.62) > modem (172.16.0.1) > internet

    I have change /proc/sys/net/ipv4/ip_forward from 0 to 1
    and Routing table is:

    Code:
    Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
    172.16.0.62     *               255.255.255.255 UH    0      0        0 eth0
    10.0.0.62       *               255.255.255.255 UH    0      0        0 eth0
    10.0.0.0        10.0.0.62       255.255.255.0   UG    0      0        0 eth0
    10.0.0.0        *               255.255.255.0   U     0      0        0 eth0
    172.16.0.0      172.16.0.62     255.255.255.0   UG    0      0        0 eth1
    172.16.0.0      *               255.255.255.0   U     0      0        0 eth1
    default         172.16.0.1      0.0.0.0         UG    0      0        0 eth1
    But client not connect internet when use debian router

    Help me config debian router. Thank pro so mush.

  2. #2
    Just Joined!
    Join Date
    May 2009
    Posts
    2
    Edit IP Address configuration at /etc/network/interfaces file :
    Code:
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    allow-hotplug eth1
    auto eth1
    iface eth1 inet static
            address 172.16.0.1
            netmask 255.255.255.0
            network 172.16.0.0
            gateway 172.16.0.1
            dns-nameservers 172.16.0.1  #change with your DNS from your ISP
    
    allow-hotplug eth0
    auto eth0
    iface eth0 inet static
            address 10.0.0.62
            netmask 255.255.255.0
            network 10.0.0.0
    Restart networking.
    Code:
    # /etc/init.d/networking restart
    Then, install shorewall.
    Code:
    #apt-get install shorewall
    Edit /etc/default/shorewall
    Code:
    startup=1
    Edit /etc/shorewall/zones

    Code:
    loc     ipv4
    net     ipv4
    Edit /etc/shorewall/interfaces

    Code:
    net     eth1    detect    blacklist
    loc     eth0    detect    blacklist
    Edit /etc/shorewall/masq

    Code:
    eth1    eth0
    Edit /etc/shorewall/policy . Close all port as default.

    Code:
    fw      net     REJECT
    fw      loc     REJECT
    
    loc     fw      REJECT
    loc     net     REJECT
    
    net     all     DROP
    all     all     DROP
    Edit /etc/shorewall/rules. Open port for special port and clients.

    Code:
    ACCEPT          loc          net     tcp     25,143,110,80,443 #smtp,imap,pop,http,https
    ACCEPT          fw           loc     tcp     25,143,110,80,443 #smtp,imap,pop,http,https
    Edit /etc/shorewall/routestopped

    Code:
    eth0            -
    eth1            -
    Start Shorewall
    Code:
    # /etc/init.d/shorewall start
    Edit DNS resolve /etc/resolv.conf
    Code:
    nameserver 172.16.0.1   #change with your DNS from your ISP

Posting Permissions

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