Category: ‘iptables’


July 12, 2012 Posted by admin

Recently I worked on an infiniband system that needed internet access and did
not have an ib to ethernet bridge. I decided to use a linux server to act as
a router using iptables.
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/sbin/iptables -A FORWARD -i eth0 -o ib0 -m state –state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i ib0 -o eth0 -j ACCEPT