multiple network interfaces

Need help? Post your questions here.
jonnymnemo
Contributor
Contributor
Posts: 26
Joined: 13 Dec 2012, 14:04
Has thanked: 3 times
Been thanked: 6 times

multiple network interfaces

Unread post by jonnymnemo »

Hi !
I'm on Ubuntu 14.04LTS server edition.

I've been running madsonic for a long time, and it is becoming better and better. :P Thanks MadEvil ! :twisted:
Recently, I have installed openvpn, which works fine. I had to put some iptables rules on the hosted subsonic server in order to make it work.

The problem is that when I'm on my local network, I can't access my madsonic interface (xxxxxx.subsonic.org), it tries to access via the tun0 IP (the one for the vpn) instead of eth0 (my real local ip). The only workaround is to put the local address 192.x.x.x:4040. From outside the local network, it works perfectly fine.

Have you any idea of a rule I can add in iptables to change this behaviour ?

Here is my iptables config (generated via webmin) :

Code: Select all

# Generated by iptables-save v1.4.21 on Mon Nov  3 18:49:42 2014
*nat
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
-A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
COMMIT
# Completed on Mon Nov  3 18:49:42 2014
# Generated by iptables-save v1.4.21 on Mon Nov  3 18:49:42 2014
*mangle
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
COMMIT
# Completed on Mon Nov  3 18:49:42 2014
# Generated by iptables-save v1.4.21 on Mon Nov  3 18:49:42 2014
*filter
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
-A INPUT -j ACCEPT
-A INPUT -i eth0 -j ACCEPT
-A INPUT -i tun0 -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
-A INPUT -p udp -m udp --dport 1194 -j ACCEPT
-A FORWARD -i tun0 -j ACCEPT
COMMIT
# Completed on Mon Nov  3 18:49:42 2014

I must also add that the dhcp server is not on the same machine, that's why all traffic is opened, i have a firewall on the dhcp server, where I changed nothing (except a rule to authorise openvpn).
User avatar
DoCC
Contributor
Contributor
Posts: 211
Joined: 25 Feb 2014, 14:41
Has thanked: 40 times
Been thanked: 65 times

Re: multiple network interfaces

Unread post by DoCC »

mh still did not get the point,

so you are telling us thar your server is reachable from the outside via domainname.
but not from the inside ?

the fact you have messed around with an vpn server an the same machine should not be part of this problem.

i guess your problem is somewhere on the dns chain

to make things easier try to run differend machines ( vm ) , keep the systems separate.
- one media machine
. one vpn gateway
- one server dealing with dns dhcp and firewall

after that the network setup is much more easier to handle .

jm2c
Post Reply