I have been tearing my hair out with this (and not enough left to keep going).
I have a linux box (raspberry pi) single ethernet interface in a heavily filtered DMZ with external ports fwd'd that can access an internal IP's (different subnet).
I want to forward the traffic. Should be simple I thought and in fact I have it working using 'nc' as a 'one hit' as follows
But I need this to be a permanent fwd. So after much googling tried to set up iptables to do this.
IP of pi is 192.168.1.8 it has an external IP with management port and port 80 fwd's at the router to the internal ip. The IP of the service I am trying to fwd to is 172.16.100.102 which is accessible as I said above from the PI (but not explicitly in the pi's routing table, just accessible via the default route)
I have enabled fwd'ing on the eth0 interface
I have tried several slightly different rulesets but feel the following is the closest
this gives me the following info
I know it's working to an extent (that is doing something to port 80) as if I have the port open and logging ( nc -l localhost 80 > log.txt ) and then implement the iptables rules above I can no longer connect to port 80 until I purge the rules again.
I also notice that iptables doesn't seem to actually 'open' the port.
So questions are twofold.
1) do I have to activate a service to open the port so that the iptables rules can then apply or is there a way to have iptables open the port?
2) how do I make this damn thing work?
Any input greatly appreciated.
---------- Post updated at 11:49 AM ---------- Previous update was at 05:29 AM ----------
Could a moderator please move this to the IP Networking Thread ? as I think it would be more relevant there.
---------- Post updated 11-28-12 at 09:25 AM ---------- Previous update was 11-27-12 at 11:49 AM ----------
Managed to get this working much more simply as follows:
Last edited by Scott; 11-27-2012 at 06:38 AM..
Reason: Please use code tags
Hello,
I wanted to setup routing certain traffic (http/s) out via a second (faster) interface, like described in the following docs (may not post urls):
linux-ip.net /html/adv-multi-internet.html
thegeekstuff.com /2014/08/add-route-ip-command/
I already had this working years ago on... (0 Replies)
Hi,
I've got a regex match to perform in a Bash script and can't quite get it right.
Basically I want to match all IP address like sequences in a file which may or may not contain an IP address but with the extra qualification of ignoring any IP-like sequence which begins and ends with a... (27 Replies)
Hi,
I´ve given only this info to configure a network interface : "port 1 PCI 4"
I´ve been searching for any kind of relationship in the system which allow me to find the etc that must be configured...
Please, could anybody help me?
rhxx:#/root# lspci |grep -i "PCI BRIDGE"
00:01.0 PCI... (0 Replies)
Hi,
How can I config iptables to allow port forwarding from one WAN interface to second lan interface .
In my system I have one wan interface 61.93.204.56 (eth0),and lan interface 10.2.1.52(eth1)
I want to make port forward port no 22 from 61.93.204.56 to
port 22 , 10.2.1.52 , tcp and udp... (1 Reply)
Hi,
During Nagios install we added the following piece of config to apache httpd.conf file and it runs on the regular port 80, now if I want to run this on a different port then what needs to changed to make it run on lets say port 8080.
I tried adding Virtual servers but was getting... (1 Reply)
Hi all
I have installed a demo version of SCO OpenServer 5.0.2, I finally found it is Desktop Interface, I would like to know how to change its interface to dos based interface?
If you have any ideas, please tell me then. Thank you (2 Replies)
Dear Friends ,
I am using RHEL 5 . In my Linux Box i have two Lan cards (eth0 and eth1) .
"eth0" is connected with network 192.168.10.0 and "eth1" is connected with network 192.168.11.0 . Both Network are inter connected via routing .
Now I want a situation where , I want to dedicatedly... (2 Replies)
I admin two co-located servers. I built an app that creates subdirectories for users ie www.site.com/username.
one server that works just fine when you hit that url, it sees the index within and does as it should.
I moved the app to my other server running FEDORA 1 i686 standard, cPanel... (3 Replies)
Hello all am new to unix
i have acces to unix machine s commandline at my collage
wen entering uname -a command i get this output
SunOS ws7 5.8 Generic_108528-20 sun4u sparc SUNW,Sun-Blade-1500
all i need help in seting up a simple prort forward from this machine ie this machine listen on... (5 Replies)