Select Your Language

Infrastructure and Management

Cloud Computing

Storage

Runtimes

Integration and Automation

  • Comments
  • RHEL 6 gateway config

    Posted on

    Hi,

     

    I am trying to configure a RHEL 6 server as a gateway to the internet for an inner server.

     

    The gateway server (server1) has 2 NICs:

     

    em1 192.168.168.56/24

    em2 20.249.6.135/24

    default gateway 192.168.168.254

     

    The inner server (server2) has:

     

    eth1 20.249.6.136/24

    default gateway 20.249.6.135

     

    I have forwarding allowed:

    # cat /proc/sys/net/ipv4/ip_forward
    1

    # iptables -L -n -v

    Chain FORWARD (policy ACCEPT 79 packets, 6636 bytes)

     

    I can ping and ssh from server1 to server2, and vice-a-versa.   I cannot ping the ultimate gateway and beyond 192.168.168.254.

     

    You can see from the FORWARD accept packets that the pings are arriving at server2.

     

    I have tried to configure SNAT with this unsuccessfully:

     

    iptables -t nat -A POSTROUTING -o em1 -j MASQUERADE

     

    Thanks for any help you can provide.

    by

    points

    Responses

    Red Hat LinkedIn YouTube Facebook X, formerly Twitter

    Quick Links

    Help

    Site Info

    Related Sites

    © 2026 Red Hat