Nethence Newdoc Olddoc Lab Your IP BBDock  

Setting up IPNAT on NetBSD

sysctl -w net.inet.ip.forwarding=1

cd /etc
cp -pi sysctl.conf sysctl.conf.dist
vi sysctl.conf

net.inet.ip.forwarding=1

vi /etc/ipnat.conf

map vioif0 INTERNAL_NET/24 -> PUBLIC_IP/32 proxy port ftp ftp/tcp
map vioif0 INTERNAL_NET/24 -> PUBLIC_IP/32 portmap tcp/udp 10000:20000
map vioif0 INTERNAL_NET/24 -> PUBLIC_IP/32

vi /etc/rc.conf

ipnat=yes

rc.d/ipnat start

note. the vioif0 interface is the one facing the public interface, not the private one.

ref. https://www.netbsd.org/docs/network/nsps/config_ipnat.html


Home | GitHub | Docker Hub | Donate | Contact