IP/Port Routing CentOS 6.9

Issues related to configuring your network
jnholmes
Posts: 8
Joined: 2016/12/08 16:02:23

IP/Port Routing CentOS 6.9

Postby jnholmes » 2018/01/15 14:41:36

I am trying to setup a http server on a cent OS 6.9 machine already running a ftp server. The ftp server(10.0.0.127:21) works perfectly but when I try to connect to the web server page (10.0.0.127:80) from any browser (local or remote), it forwards me to the other interface ip address (192.168.168.121). My question is what should I be looking for when it comes to ip/port routing procedures. Needless to say, I did not setup the ftp server so I am not sure what exactly to look for. If someone could give me a list of all possibilities I would be grateful.

Whoever
Posts: 987
Joined: 2013/09/06 03:12:10

Re: IP/Port Routing CentOS 6.9

Postby Whoever » 2018/01/16 04:07:55

Start by looking at your webserver (/etc/httpd/*) configuration.

jnholmes
Posts: 8
Joined: 2016/12/08 16:02:23

Re: IP/Port Routing CentOS 6.9

Postby jnholmes » 2018/01/20 21:01:44

Thank you for the answer. It isn't httpd.conf file though, the port/ip routing rule has been in place even before I setup the http server so I know it isn't something the new config files are doing. I have turned off iptables, iproute2 ... What are my other choices for packages that could be affecting routing procedures? Listed below are the status of things I know of.

iptables:

Code: Select all

# service iptables status
iptables: Firewall is not running.


iproute2 (tried with these rules in place and without)

Code: Select all

# cat /etc/iproute2/rt_tables
#
# reserved values
#
255   local
254   main
253   default
0   unspec
#
# local
#
#1   inr.ruhep

1 admin


Added 'admin' table to iproute2:

Code: Select all

ip route add 10.0.0.0/24 dev eth1 src 10.0.0.127 table admin
ip route add default via 10.0.0.1 dev eth1 table admin
ip rule add from 10.0.0.127/24 table admin
ip rule add to 10.0.0.127/24 table admin


ifconfig:

Code: Select all

# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:25:90:D9:94:5C 
          inet addr:192.168.168.121  Bcast:192.168.168.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3115333 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2354406 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:748203676 (713.5 MiB)  TX bytes:2463478020 (2.2 GiB)
          Interrupt:16 Memory:df300000-df320000

eth1      Link encap:Ethernet  HWaddr 00:25:90:D9:94:5D 
          inet addr:10.0.0.127  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:235006 errors:0 dropped:0 overruns:0 frame:0
          TX packets:137863 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:349040159 (332.8 MiB)  TX bytes:12090703 (11.5 MiB)
          Interrupt:18 Memory:df200000-df220000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:648325 errors:0 dropped:0 overruns:0 frame:0
          TX packets:648325 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:40365283 (38.4 MiB)  TX bytes:40365283 (38.4 MiB)