When you say you block yourself out, do you mean you're doing this remotely? You always have to have a rule that allows all access to / from *your* IP then.
Main Topics
Browse All TopicsI am tring to setup a Linux firewall that allows both H323 and SIP to passthough from only the ip address i assign. When i try this i block my self out and have to reinstall. This has been a very frustrating process would like some assistance.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
> I am tring to setup a Linux firewall that allows both H323 and SIP to passthough
That's a challenging task. h.323 and sip both use UDP streams on random ports.
> When i try this i block my self out and have to reinstall.
if you are configuring iptables remotely, always add your IP address as the first rule in INPUT and OUTPUT chains.
If your kernel is configured with 'default to deny' iptables policy, then you will be blocked on firewall restart: 'service iptables restart'
Before doing such restart change default policy:
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
then you may flush the rules (iptables -F INPUT)
According to Asterisk page (http://www.voip-info.org/
iptables -A INPUT -p udp -m udp --dport 5060 -j ACCEPT
but when I setup QoS recently for someone, udp/4569 (IAX2) did the trick for me (between two Asterisk boxes)
H323 traffic:
iptables -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $EXTIF -o $EXTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp -m tcp --dport 1720 -j ACCEPT
Haven't played with H323 too much, but from what I read tcp/1720 is the control channel per se, so it should open the dynamic ports as needed thanks to the first two lines re: established connections in state table.
Business Accounts
Answer for Membership
by: arnoldPosted on 2009-02-24 at 22:07:43ID: 23730663
Block everything else is what you want. Could you post the iptables rules you are adding as well as the iptables rules that exist?
iptables -t nat -L
iptables -t filter -L
Could you post the network layout and what you want to do.