Hello everyone,
I followed many tutorials and I have following rules in iptables:
I save it with this:
But still, I cannot access guest en services.
My network settings:
What I am doing wrong?
Thank you.
I followed many tutorials and I have following rules in iptables:
Code:
iptables -t nat -I PREROUTING -p tcp -d x.x.104.49 --dport 22 -j DNAT --to-destination 192.168.122.20:22
iptables -I FORWARD -m state -d x.x.104.49/27 --state NEW,RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -I PREROUTING -p tcp --source -d 192.168.122.0/24 -j ACCEPT
Code:
service iptables-persistent save
My network settings:
Code:
em1 Link encap:Ethernet HWaddr b8:ac:6f:8b:7d:49
inet addr:x.x.104.49 Bcast:x.x.104.63 Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:45643 errors:0 dropped:0 overruns:0 frame:0
TX packets:38934 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3631264 (3.6 MB) TX bytes:3491706 (3.4 MB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:10108 errors:0 dropped:0 overruns:0 frame:0
TX packets:10108 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1616262 (1.6 MB) TX bytes:1616262 (1.6 MB)
virbr0 Link encap:Ethernet HWaddr fe:54:00:51:b2:fe
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:46 errors:0 dropped:0 overruns:0 frame:0
TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:5057 (5.0 KB) TX bytes:5749 (5.7 KB)
vnet0 Link encap:Ethernet HWaddr fe:54:00:51:b2:fe
inet6 addr: fe80::fc54:ff:fe51:b2fe/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:46 errors:0 dropped:0 overruns:0 frame:0
TX packets:3282 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:5701 (5.7 KB) TX bytes:174513 (174.5 KB)
Thank you.