IPtables - how to open all porst to a server

I have an iptables firewall, and I'm troubleshooting a vpn problem. I'd like to open all ports (udp / tcp / whatever else) to that server for a few minutes to see if my vpn problem goes away.

Is there a simply snippet of code for this?

I'm using this for port forwarding right now:
Code:
#Let everyone outside get to .2 (VPN server - 192.168.1.6)
#VPN - gre / 47 and 1723 are PPTP ports
/sbin/iptables -A FORWARD -i eth1 -p 47 -m state --state NEW -j LOGGING -s 0.0.0.0/0 -d 192.168.1.6
/sbin/iptables -A FORWARD -i eth1 -p tcp --dport 1723 -m state --state NEW -j LOGGING -s 0.0.0.0/0 -d 192.168.1.6
#VPN - 500 and 1701 are L2TP ports, 4500 is for IPSEC
/sbin/iptables -A FORWARD -i eth1 -p udp --dport 500 -m state --state NEW -j LOGGING -s 0.0.0.0/0 -d 192.168.1.6
/sbin/iptables -A FORWARD -i eth1 -p udp --dport 1701 -m state --state NEW -j LOGGING -s 0.0.0.0/0 -d 192.168.1.6
/sbin/iptables -A FORWARD -i eth1 -p udp --dport 4500 -m state --state NEW -j LOGGING -s 0.0.0.0/0 -d 192.168.1.6

 

 

 

 

Top