How to Setup openSUSE as Router

Setting up openSUSE as router is not too difficult. The setup process only needed a few step to completed, as shown in the following wizard :
Configuration :
[code language=’cpp’]
eth0 IP Address :
eth1 IP Address :
Gateway :
DNS 1 :
DNS 2 :

  1. Activating router function
    [code language=’cpp’]echo 1>/proc/sys/net/ipv4/ipforward[/code]
  2. Create a routing with network as a target
    [code language=’cpp’]route add -net gw[/code]
  3. Create a routing table
    [code language=’cpp’]iptables -t nat -A POSTROUTING -s -j MASQUERADE[/code]
  4. Saving IPTables setting
    [code language=’cpp’]iptables-save > /etc/sysconfig/iptables-net[/code]
  5. Make sure IPTables will be started while booting
    [code language=’cpp’]vi /etc/init.d/network[/code]
  6. Add the options :
    [code language=’cpp’]iptables-restore < /etc/sysconfig/iptables-net[/code]
  7. Save the configuration
  8. Check the router function by running ping command from host client into internet address

Reference (Indonesian) :

  1. Membuat Router di SUSE

4 thoughts on “How to Setup openSUSE as Router

Leave a Reply

Your email address will not be published. Required fields are marked *