Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Security
Reload this Page iptables/ipchains syntax?
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Security Discussion about keeping your machines secure, and the crackers out.

Reply
 
Thread Tools Display Modes
Old 07-31-2003   #1 (permalink)
Linux Engineer
 
Join Date: Apr 2003
Location: Sweden
Posts: 796
iptables/ipchains syntax?

How do i format my ipchains command to accept syslog messages on port 504 but to redirect them to another local port, for example 1002??

is it somethinglike this??

Code:
ipchains -C input -p tcp -y -i eth0 -s 192.168.1.1 504 -d 192.168.1.1 1002
__________________
Regards

Andutt
andutt is offline   Reply With Quote
Old 07-31-2003   #2 (permalink)
Linux Newbie
 
Join Date: Apr 2003
Location: UK, Manchester
Posts: 147
Send a message via AIM to craig_mcd
iptables -t nat -A PREROUTING -p tcp -s <ip address/range> -d <ip addess> --dport 504 -j REDIRECT --to-port 1002

That will work for iptables, I am not sure if it would be similar for ipchains.
craig_mcd is offline   Reply With Quote
Old 07-31-2003   #3 (permalink)
Linux Engineer
 
Join Date: Apr 2003
Location: Sweden
Posts: 796
Thanks a lot....i will try that.
__________________
Regards

Andutt
andutt is offline   Reply With Quote
Old 07-31-2003   #4 (permalink)
Linux Engineer
 
Join Date: Apr 2003
Location: Sweden
Posts: 796
How can i see that this chain is enabled?? With iptables -L -n i only see..

Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Which is standard right??
__________________
Regards

Andutt
andutt is offline   Reply With Quote
Old 07-31-2003   #5 (permalink)
Linux Engineer
 
Join Date: Apr 2003
Location: Sweden
Posts: 796
When i check the module with lsmod it looks like this though..

Code:
ip_tables              15096   5  [ipt_REDIRECT iptable_nat iptable_filter]
__________________
Regards

Andutt
andutt is offline   Reply With Quote
Old 07-31-2003   #6 (permalink)
Linux Newbie
 
Join Date: Apr 2003
Location: UK, Manchester
Posts: 147
Send a message via AIM to craig_mcd
You need to specify the table.

iptables -L -t nat
craig_mcd is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 02:15 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0