Hi,
I'm trying to set up my firewall for my openvpn network. Right now, I have the following rules:
Code:
iptables -P FORWARD DROP
iptables -A INPUT -i tun+ -j ACCEPT
iptables -A FORWARD -o tun+ -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i tun+ -o eth0 -m state --state NEW -j ACCEPT
However, although I can establish an HTTP connection, no data is being returned.
If I allow all packets through using
Code:
iptables -A FORWARD -j ACCEPT
Then everything works.
If I log the packets not accepted for forwarding, I see they look like
Code:
IN=tun0 OUT=eth0 SRC=192.168.2.5 DST=209.85.171.100 LEN=52 TOS=0x00 PREC=0x00 TTL=63 ID=45770 DF PROTO=TCP SPT=37063 DPT=80 WINDOW=92 RES=0x00 ACK URGP=0
IN=tun0 OUT=eth0 SRC=192.168.2.5 DST=209.85.171.100 LEN=271 TOS=0x00 PREC=0x00 TTL=63 ID=45771 DF PROTO=TCP SPT=37063 DPT=80 WINDOW=92 RES=0x00 ACK PSH URGP=0
IN=tun0 OUT=eth0 SRC=192.168.2.5 DST=209.85.171.100 LEN=64 TOS=0x00 PREC=0x00 TTL=63 ID=45772 DF PROTO=TCP SPT=37063 DPT=80 WINDOW=92 RES=0x00 ACK URGP=0
IN=tun0 OUT=eth0 SRC=192.168.2.5 DST=209.85.171.100 LEN=64 TOS=0x00 PREC=0x00 TTL=63 ID=45773 DF PROTO=TCP SPT=37063 DPT=80 WINDOW=92 RES=0x00 ACK URGP=0
IN=tun0 OUT=eth0 SRC=192.168.2.5 DST=209.85.171.100 LEN=271 TOS=0x00 PREC=0x00 TTL=63 ID=45774 DF PROTO=TCP SPT=37063 DPT=80 WINDOW=92 RES=0x00 ACK PSH URGP=0
IN=tun0 OUT=eth0 SRC=192.168.2.5 DST=209.85.171.100 LEN=64 TOS=0x00 PREC=0x00 TTL=63 ID=45775 DF PROTO=TCP SPT=37063 DPT=80 WINDOW=92 RES=0x00 ACK URGP=0
IN=tun0 OUT=eth0 SRC=192.168.2.5 DST=209.85.171.100 LEN=52 TOS=0x00 PREC=0x00 TTL=63 ID=45776 DF PROTO=TCP SPT=37063 DPT=80 WINDOW=92 RES=0x00 ACK FIN URGP=0
Should I just be allowing all traffic from tun0 to eth0? Is there any risk there? I found the original suggestion to only allow NEW traffic on several websites, but it doesn't seem to be correct...