Networking Forums

Networking Forums > Computer Networking > Linux Networking > Routing/NAT

Reply
 
 
Markus Schmitt
Guest
Posts: n/a

 
      02-16-2008, 08:20 PM
Hello!

I have downloaded "Yacy" and configured a port forwarding:


-A FORWARD -d 10.0.0.15 -i ppp0 -o eth0 -p tcp -m tcp --dport 4000 -j ACCEPT

-A PREROUTING -i ppp0 -p tcp -m tcp --dport 4000 -j DNAT
--to-destination 10.0.0.15:4000


Routes:
Ziel Router Genmask Flags Metric Ref Use Iface
217.0.118.100 * 255.255.255.255 UH 0 0 0 ppp0
localnet * 255.255.255.0 U 0 0 0 eth0
default * 0.0.0.0 U 0 0 0 ppp0

All is working, but requests from the inside network to the outside
port forwarding (ppp0) seems to go to the local router address.
The yacy application tries to reach it self on the public internet
address, this is a problem.
 
Reply With Quote
 
 
 
 
Pascal Hambourg
Guest
Posts: n/a

 
      02-16-2008, 09:12 PM
Hello,

Markus Schmitt a écrit :
>
> I have downloaded "Yacy" and configured a port forwarding:
>
> -A FORWARD -d 10.0.0.15 -i ppp0 -o eth0 -p tcp -m tcp --dport 4000 -j
> ACCEPT
>
> -A PREROUTING -i ppp0 -p tcp -m tcp --dport 4000 -j DNAT
> --to-destination 10.0.0.15:4000

[...]
> All is working, but requests from the inside network to the outside port
> forwarding (ppp0) seems to go to the local router address.


Your DNAT rule in nat/PREROUTING matches only packets received on ppp0,
whereas packets from the inside network arrive on eth0. You need to
either remove "-i ppp0" from that rule or add a similar rule with "-i eth0".

You also need to make sure traffic in FORWARDING from eth0 to eth0 is
accepted. Finally you need to add a rule in nat/POSTROUTING which SNATs
packets forwarded from eth0 to eth0, else it won't work :

iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.0/24 -d 10.0.0.15 \
-p tcp --dport 4000 -j SNAT --to $eth0_ip_address
 
Reply With Quote
Reply

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing routing in LAN-WAN routing mc Windows Networking 5 12-03-2008 03:22 PM
Win2003 R2 server just stops routing traffic until I restart Routing service Martijn Tonies Windows Networking 8 11-03-2008 11:05 AM
IP Routing ITCOM Windows Networking 1 07-30-2007 04:29 PM
I not find the NAT/Basic Firewall under Routing\IP Routing mtczx232@yahoo.com Windows Networking 2 12-16-2006 04:08 PM
routing between 2 nic ckwong19802003@yahoo.com Windows Networking 7 02-13-2006 01:43 PM



1 2 3 4 5 6 7 8 9 10 11