LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-28-2003, 10:31 AM   #1
AdamRankin
LQ Newbie
 
Registered: Jul 2002
Posts: 5

Rep: Reputation: 0
Simple IPTables... Want to pass all data from one external IP to an internal IP


and vice versa.

We're trying to play a game using TCP/IP and I can't get my ruleset to work.

I've tried

iptables -A FORWARD -s 24.42.115.228 -o 192.168.0.1 -j ACCEPT

but I don't think that's the right setting (of course seeing as that didn't work)

If anyone has any experience (which someone must have) with this, could you suggest a good way of doing this, or perhaps describe how you did it?

Thanks for the help,

Adam
 
Old 03-28-2003, 10:59 AM   #2
AdamRankin
LQ Newbie
 
Registered: Jul 2002
Posts: 5

Original Poster
Rep: Reputation: 0
Ok, perhaps a more simple question.

Would this fall under the forwarding category, or the nat PREROUTING category.

I'm not sure how it all works, but I think I want to forward ALL packets sent from his IP to my IP.

Argh!
 
Old 03-28-2003, 01:46 PM   #3
Blindsight
Member
 
Registered: Mar 2003
Distribution: Slackware
Posts: 234

Rep: Reputation: 30
try

try -j MASQ or -j MASQUERADE, don't remember which.

search google for iptables HOWTO, read that. It'll tell you exactly how to do it. I haven't messed with iptables in quite a while.
 
Old 04-01-2003, 03:24 AM   #4
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
It needs to be a PREROUTING rule if the server is in your network

eg
iptable -t nat -A PREROUTING -p tcp --dport xxx -j DNAT --to-destination 192.168.0.1

Gaming servers can also use secondary connections/ports, so you also need
iptables -A FORWARD -m state --state RELATED -j ACCEPT
This requires some special ip_conntrack modules designed to track that particular connection type, eg irc, quake, ...

Usually, if you search Google for the game name, you will find help on firewall configs, port numbers etc.
 
  


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
How to pass data from one apllication to another. Darkeye Linux - Software 6 10-17-2005 01:10 AM
How to pass data to a console program with multiple inputs? juanbobo Programming 3 08-18-2005 06:39 PM
Pass data between windows agallant Programming 3 10-21-2004 11:29 AM
NT Domain Promtp for User/Pass - Simple Question zcorpio Linux - Networking 6 09-14-2004 11:19 AM
Internal or External Modem noclue_menew Linux - Hardware 15 09-02-2003 05:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:15 AM.

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