User Tools

Site Tools


linux-packet-forwarding

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
linux-packet-forwarding [2022/01/29 11:27] – [Basic outgoing masquerding script] baumilinux-packet-forwarding [2022/01/29 11:27] (current) – [Basic outgoing masquerding script] baumi
Line 16: Line 16:
 iptables -t nat -I POSTROUTING -s $network -o $ext_if -j SNAT --to-source $ext_ip iptables -t nat -I POSTROUTING -s $network -o $ext_if -j SNAT --to-source $ext_ip
 # Create FW rules to allow traffic # Create FW rules to allow traffic
-iptables -I FORWARD -m conntrack --ctstate ESTABLISHED -j ACCEPT 
 iptables -I FORWARD -s $network -j ACCEPT iptables -I FORWARD -s $network -j ACCEPT
 +iptables -I FORWARD -m conntrack --ctstate ESTABLISHED -j ACCEPT
 # Turn on forwarding # Turn on forwarding
 echo 1 > /proc/sys/net/ipv4/ip_forward echo 1 > /proc/sys/net/ipv4/ip_forward
linux-packet-forwarding.1643452066.txt.gz · Last modified: 2022/01/29 11:27 by baumi

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki