LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-20-2007, 01:41 PM   #1
smarthouseguy
LQ Newbie
 
Registered: Jan 2006
Posts: 15

Rep: Reputation: 0
rc.firewall issue


ok, so this is my situation

I am using slackware 12.0 w/ asterisk 1.4.10.1 so this is my rc.firewall script:

Code:
echo 1 > /proc/sys/net/ipv4/ip_forward



iptables --flush


iptables --table nat --flush
iptables --delete-chain


iptables --table nat --delete-chain


iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT

iptables -t mangle -N common
iptables -t mangle -N asterisk
iptables -t mangle -A common -p tcp --dport 80 -j MARK --set-mark 2
iptables -t mangle -A common -p tcp --dport 8080 -j MARK --set-mark 2
iptables -t mangle -A common -p tcp --dport 443 -j MARK --set-mark 2
iptables -t mangle -A common -p tcp --dport 110 -j MARK --set-mark 2
iptables -t mangle -A common -p tcp --dport 119 -j MARK --set-mark 2
iptables -t mangle -A common -p tcp --dport 25 -j MARK --set-mark 2
iptables -t mangle -A common -p udp --dport 53 -j MARK --set-mark 2
iptables -t mangle -A common -p udp --dport 68 -j MARK --set-mark 2
iptables -t mangle -A asterisk -p udp --sport 5060 -j MARK --set-mark 1
iptables -t mangle -A asterisk -p udp --dport 5060 -j MARK --set-mark 1
iptables -t mangle -A asterisk -p tcp --dport 5036 -j MARK --set-mark 1
iptables -t mangle -A asterisk -p udp --dport 5036 -j MARK --set-mark 1
iptables -t mangle -A asterisk -p udp --dport 4569 -j MARK --set-mark 1
iptables -t mangle -A asterisk -p udp --sport 10000:20000 -j MARK --set-mark 1
iptables -t mangle -A FORWARD -i eth0 -o eth1 -j MARK --set-mark 3
iptables -t mangle -A FORWARD -i eth0 -o eth1 -j common
iptables -t mangle -A FORWARD -i eth0 -o eth1 -j asterisk
iptables -t mangle -A FORWARD -i eth0 -o eth1 -p icmp -j MARK --set-mark 1
this should be creating some qos for my SIP and other stuff for asterisk.


My phones are on private nat lan behind this box:

eth0 public
eth1 private

I have another asterisk box at work and need 2 of my cisco 7960g phones to be able to connect there... I can connect, but calls from the office box do not make it to my home phones behind my home asterisk box. I'm hoping that changing some ports my fix the issue with the remote box, but not sure how to do that. For example, if I was to change sip from 5060 to 5061 and rtp from 10000-20000 to 25000-35000 how could I fwd those ports to more than one location on private network ie.{(10.77.76.41 and 10.77.76.42)or even to a range of ips}?? in iptables is there seems to be no pnp, am I even going about this right?? any advise would be greatly appreciated....

Kind Regards
 
Old 08-23-2007, 08:37 AM   #2
magarus
LQ Newbie
 
Registered: Oct 2006
Posts: 14

Rep: Reputation: 0
advanced routing?

this is just a suggestion, try using iproute2 as iptables is basicly a firewall and not an advanced router . http://lartc.org/howto/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Routing or firewall issue svandena Linux - Networking 6 11-14-2006 09:34 AM
Firewall issue myself_rajat Linux - Networking 3 12-21-2004 12:06 AM
Firewall Issue benhalliday Linux - Software 1 08-06-2004 07:52 AM
APF Firewall issue nepcw Linux - Security 2 04-27-2004 02:55 PM
firewall issue linuxnube Linux - Networking 1 11-04-2003 12:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration