LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Simple enough...iptables..port forwarding (https://www.linuxquestions.org/questions/linux-networking-3/simple-enough-iptables-port-forwarding-70176/)

pembo13 07-04-2003 08:16 PM

Simple enough...iptables..port forwarding
 
Hi guys,

I just wanted a little help.

Could someone give me some sample IPTABLES lines to do port forwading of ports 7750:7751 for both UDP and TCP, to a machine (192.168.100.11).

The router/firewall has:
-eth0 as the internal NIC on IP 192.168.100.1
and
-eth1 as the external NIC on a dynamic IP

And also, isn't #IPTABLE --check suppose to be the command to do rule checking with ITPABLES? If not, what is it to do rule checking please?

Thanks Alot

TheOther1 07-05-2003 11:10 AM

Try:
iptables --check [chain]
to test this packet on chain

Try man iptables to see all commands

pembo13 07-18-2003 10:05 PM

Portforwading???????
Somebody....Anybody....HELP!!!!!!

ppuru 07-19-2003 01:22 AM

use

iptables -t NAT

Sutekh 07-19-2003 02:08 AM

Yopu may have already sorted this but a rule like the following should work

iptables -t nat -A PREROUTING -p tcp --dport 7750:7751 -i eth1 -j DNAT --to 192.168.100.11

any connection to eth1 on ports 7750 or 7751 will be passed through to 192.168.100.11 (just change tcp fpr udp for the udp part).

Rich


All times are GMT -5. The time now is 12:15 PM.