Find the answer to your Linux question:
Results 1 to 4 of 4
Hello Can some one guide me with below setup 1. i have a private LAN in the subnet 192.168.100.0 2. i have another private LAN in the subnet 129.221.0.0 3. ...
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    20

    Need Help on IPtables

    Hello
    Can some one guide me with below setup

    1. i have a private LAN in the subnet 192.168.100.0
    2. i have another private LAN in the subnet 129.221.0.0
    3. i have a linux with redhat OS installed having 2 nic cards
    4. 1 NIc card is in 192.168.100.0 subnet and other is in 129.221.0.0 subnet
    5. I want users in 129.221.0.0 netowork need to access machines in 192.168.100.0 netowkr via this linux box
    6.
    i have reserved IPs in 129.221.0.0 network ( to be specific these reserved IP should map to the 192.168.0.0 network using IP tables)
    can some one guide?

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,281
    If these are both private LAN's then all you need to do is turn on Forwarding.
    Edit /etc/sysctl.conf and change the following;

    Code:
    # Controls IP packet forwarding
    net.ipv4.ip_forward = 0
    To

    Code:
    # Controls IP packet forwarding
    net.ipv4.ip_forward = 1
    This will setup your system to turn on forwarding anytime the box is booted.

    Now enter the following command to turn on forwarding right now
    Code:
    echo 1 > /proc/sys/net/ipv4/ip_forward
    Now one LAN should be able to talk to the other. Make sure that the routing is setup correctly so that this box will know where to send the packets.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Jul 2009
    Posts
    20
    hai
    thanks for the valuble reply

    i did the IPforwarding as per ur guidence

    My Query is

    i want to access the private LAN (192.168.100.0/24 subnet ) from another private LAN (10.10.10.0) ,,, I haves reserved some IPs in 10.10.10.0 network ,,,,users need to access the Private LAN(192.168.100.0) from the reserved ips in 10.10.10.0 network

    can u tel me how to set IPtables rules ( using DNAT/SNAT)

  4. #4
    Just Joined!
    Join Date
    Oct 2009
    Location
    linux world
    Posts
    1
    Quote Originally Posted by simha View Post
    hai
    thanks for the valuble reply

    i did the IPforwarding as per ur guidence

    My Query is

    i want to access the private LAN (192.168.100.0/24 subnet ) from another private LAN (10.10.10.0) ,,, I haves reserved some IPs in 10.10.10.0 network ,,,,users need to access the Private LAN(192.168.100.0) from the reserved ips in 10.10.10.0 network

    can u tel me how to set IPtables rules ( using DNAT/SNAT)
    what is your default router of 10.10.10.0 network? you can always use the command "route" to route add network.

Posting Permissions

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