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 : 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
[/code]
- Activating router function
[code language=’cpp’]echo 1>/proc/sys/net/ipv4/ipforward[/code] - Create a routing with network as a target
[code language=’cpp’]route add -net 168.155.121.0/24 gw 165.155.121.1[/code] - Create a routing table
[code language=’cpp’]iptables -t nat -A POSTROUTING -s 165.155.121.0/24 -j MASQUERADE[/code] - Saving IPTables setting
[code language=’cpp’]iptables-save > /etc/sysconfig/iptables-net[/code] - Make sure IPTables will be started while booting
[code language=’cpp’]vi /etc/init.d/network[/code] - Add the options :
[code language=’cpp’]iptables-restore < /etc/sysconfig/iptables-net[/code] - Save the configuration
- Check the router function by running ping command from host client into internet address
Reference (Indonesian) :
eth0 = LAN?
eth1 = Outside?
or is it the other way around
eth0 = LAN?
eth1 = Outside?
or is it the other way around
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.
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.