Configuring IPv6 IP Forwarding

OS used to configure IPv6 forwarding is Ubuntu 24.04.

#  /etc/ufw/before6.rules
# Append to end of file after last COMMIT line (for *filter target) :

cat <<EOF >> /etc/ufw/before6.rules
*nat
:PREROUTING ACCEPT [0:0]
-A PREROUTING -i eth0 -d 2a00::101 -j DNAT --to-destination fd44::101
COMMIT
EOF



## Configure ip forwarding
cat <<EOF >> /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
net.ipv6.conf.all.forwarding=1

EOF

# Reconfigure sysctl
sysctl -p

# Enable UFW - to load Ipv6 NAT rule
ufw allow ssh
ufw enable
ufw reload 

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *