LinuxLinks.com
Newbies What Next ? News Forums Calendar

Search/Browse

 Category Gateway
More Options
Category:

LinuxLinks News
 · 5 Best Open Source Multi-Platform Data Science Notebook Software
 · Learn Logo Programming with No Charge Books
 · Learn TeX Programming with Free Books
 · Grasp LaTeX Programming with Free Books
 · Master Awk Programming with Free Books
 · Become Proficient in Fortran with Free Books
 · Learn Scheme Programming with No Charge Books
 · Master Rust Programming with Free Books
 · Master Ada Programming with Free Books
 · Master Bash Programming with Free Books
(more...)
 

LinuxLinks Login

Login:

Password:



Click here
to start your own
Link collection!


Click to Visit

My LinuxLinks
 My LinuxLinksMyLinks  FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

NAT Issues Please help

 
Post new topic   Reply to topic    LinuxLinks.com Forum Index -> Networking / Security
View previous topic :: View next topic  
Author Message
jccurtis
Registered


Joined: 04 Jan 2006
Posts: 1

PostPosted: Wed Jan 04, 2006 5:16 pm    Post subject: NAT Issues Please help Reply with quote

Okay I am totally new to IPTables and networking in Linux. I have a linux box hooked to my network and want to change the source and destination address of certain packets for VOIP purposes. All I have done so far is created a script for IPTables and activated it, but it doesnt seem to do anything. Here is my script as follows:

#!/bin/bash


iptables -t filter --flush
iptables -t nat --flush
iptables -t mangle --flush

iptables -t filter --delete-chain
iptables -t nat --delete-chain
iptables -t mangle --delete-chain

iptables --policy INPUT DROP
iptables --policy OUTPUT DROP
iptables --policy FORWARD DROP
iptables -t nat --policy POSTROUTING ACCEPT
iptables -t nat --policy PREROUTING ACCEPT

iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT

iptables -F PREROUTING
iptables -A POSTROUTING -p all -s 10.22.x.x -o eth0 -j SNAT --to 172.24.x.x
iptables -A PREROUTING -p all -d 172.24.x.x -i eth0 -j DNAT --to 10.22.x.x

service iptables status

Okay, All this is activated, but doesnt seem to be actually looking at any packets. Any help appreciated...

Thanks,

Justin Curtis
Back to top
View user's profile Send private message

Display posts from previous:   
Post new topic   Reply to topic    LinuxLinks.com Forum Index -> Networking / Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2002 phpBB Group
Built with GeekLog and phpBB
Comments to the webmaster are welcome
Copyright 2009 LinuxLinks.com - All rights reserved