linux-packet-forwarding
This is an old revision of the document!
Table of Contents
Linux Packet Forwarding
Basic outgoing masquerding script
#!/bin/bash network=192.168.3.0/24 ext_if=eth0 echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -A POSTROUTING -s $network -o $ext_if -j MASQUERADE
Incoming port forwarding
port=80 host=192.168.3.80 iptables -t nat -A PREROUTING -m tcp -p tcp --dport $port -j DNAT --to-destination $host:$port
linux-packet-forwarding.1514023524.txt.gz · Last modified: 2017/12/23 11:05 by baumi