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 :

eth0 IP Address         : 197.187.87.0/28
eth1         IP Address : 165.155.121.0/24
Gateway  : 197.187.87.1
DNS                       1 : 215.155.200.45
DNS 2 : 215.155.200.46
  1. Activating router function
    echo 1>/proc/sys/net/ipv4/ipforward
  2. Create a routing with network as a target
    route add -net 168.155.121.0/24 gw 165.155.121.1
  3. Create a routing table
    iptables -t nat -A POSTROUTING -s 165.155.121.0/24 -j MASQUERADE
  4. Saving IPTables setting
    iptables-save > /etc/sysconfig/iptables-net
  5. Make sure IPTables will be started while booting
    vi /etc/init.d/network
  6. Add the options :
    iptables-restore < /etc/sysconfig/iptables-net
  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

Random Post

2 Responses for “How to Setup openSUSE as Router”

  1. NFaZe says:

    eth0 = LAN?
    eth1 = Outside?
    or is it the other way around

  2. Fred Down says:

    Thanks saved me hours, I keep my servers in the garage on their own subnet , now I can access them from the comfort of my living room.

Leave a Reply

About Vavai

Masim Vavai Sugianto Masim Vavai Sugianto, Indonesian, male, 32 years old, born and live in Bekasi-West Java, a small town near Jakarta – main city of Indonesia – since 17 May 1976. Founder of Indonesian openSUSE and Zimbra Community, an adventure, travelling and book lover.



I live in a tropical country, Indonesia that only has two seasons, dry season and rainy season. I love the dry season with bright sunshine and rare rain…There is a joke about the seasons in Indonesia. Indonesia is known as a country with so many season, ie : durian season, mango season, married season and much more...



ContactI'm currently working as an IT support for a small company based on Jakarta. My career has led me to specialize in Sysadmin, networking and software implementation with current focus on Linux and open source area. I have experience on MRP, ERP, Gemba Kaizen, Just in Time, Six Sigma and TQC/TQM. Please use my contact page if you wish to contact me.
Log in - BlogNews Theme by Gabfire themes