IP Forwarding

Discussion in 'Installation/Configuration' started by K_meleonu, Jan 18, 2007.

  1. K_meleonu

    K_meleonu New Member

    Hi to all,
    I have a small problem with ip forwarding.
    I have 1 X linux server with 2 network devices. I use Fedora Core 4.
    I have eth0 with the ip 89.34.xx.xx , gateway: 89.34.xx.xx and dns 89.34.xx.xx , eth1 and an IP class from 86.106.xx.0 to 86.106.xx.255.
    I want to make an ip forward through eth1 and connect a swich on it and then some computers and to give them IP's between 86.106.xx.1 and 86.106.xx.255 .
    Can someone tell me how to do this? I have triyed and searched on the internet but no success.
    Thank you all in advance.
    Alex
     
  2. nayyares

    nayyares New Member

    Hello,

    HTML:
    iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
    Cheers
     
  3. K_meleonu

    K_meleonu New Member

    Dones NOT work. After that i can't access my server . It only responds at ping. no http, no ssh, no nothing....
     
  4. nayyares

    nayyares New Member

    hello
    HTML:
    cat  /proc/sys/net/ipv4/ip_forward
    and tell what you get?
     
  5. K_meleonu

    K_meleonu New Member

    HI,
    Here it is...
    [root@CrazyDesign ~]# cat /proc/sys/net/ipv4/ip_forward
    1
    I have deleted all the ipforward rules to make it work again and here is my iptables -L now

    [root@CrazyDesign ~]# iptables -L
    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
     
  6. falko

    falko Super Moderator ISPConfig Developer

    That's a good question. :confused:
    However:
    doesn't work. It's for NAT, and NAT works only with private IP addresses, but 86.106.xx.xx are public IP addresses.
     
  7. K_meleonu

    K_meleonu New Member

    Yes :)
    I triyed with a firewall "Firestarter" but no effect. I have read somme recomandations on some forums to use IpCop but from what i know it work's only with internal ip's (as 192.168.1.xx)
    I have made some changes in the last time.
    I have eth0 with the ip: 89.xx.209.254, dns 89.xx.208.2 / 89.xx.208.3 and gateway 89.xx.209.1 and i have added , like virtual interfaces the ip's from 86.xx.86.10 to 86.xx.106.255 on eth0 , so i can run psybnc's on them and other services.
    I have putted the IP 86.xx.86.1 on eth1 and leaved the IP's from 86.xx.106.2 to 86.xx.106.9 free to forward them and connect other computers on them.
    The bad thing is that i don't manage to make the forward.
    If is someone who has done this before or who can help me please help me.
    Thank you all,
    Alex.
     

Share This Page