> ## Content Index
> Fetch the complete content index at: https://larrysalibra.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Symmetric Cone NAT using Linux IPTables
- URL: https://larrysalibra.com/symmetric-cone-nat-using-linux-iptables/
- Published: 2008-04-14T16:00:00.000Z
- Updated: 2008-04-14T16:00:00.000Z
- Author: Larry Salibra
- Tags: technology, networking, blog, #Import 2024-08-23 13:31

I spent quite a long time googling for a way of re-creating symmetric cone nat in house without buying Cisco hardware. Hopefully someone else will find this useful. This was done on Ubuntu 8.04 beta.

```
eth1 = public ip
eth0 = lan ip

```

```bash
echo "1" > /proc/sys/net/ipv4/ip_forward
/sbin/iptables --flush
/sbin/iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE --random
/sbin/iptables -A FORWARD -i eth1 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
/sbin/iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT

```